pub struct PreservationMetadata {
pub requests: BTreeMap<FormatId, Value>,
pub responses: BTreeMap<FormatId, Value>,
}Expand description
Exact source payloads retained for lossless same-format round trips.
Translation’s default preservation policy prefers a stored same-format body over reconstructing one from normalized fields. A caller that mutates the IR must clear the corresponding entry or use a policy with preservation disabled when those mutations must be encoded.
Fields§
§requests: BTreeMap<FormatId, Value>Original request bodies keyed by source format.
responses: BTreeMap<FormatId, Value>Original response bodies keyed by source format.
Trait Implementations§
Source§impl Clone for PreservationMetadata
impl Clone for PreservationMetadata
Source§fn clone(&self) -> PreservationMetadata
fn clone(&self) -> PreservationMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreservationMetadata
impl Debug for PreservationMetadata
Source§impl Default for PreservationMetadata
impl Default for PreservationMetadata
Source§fn default() -> PreservationMetadata
fn default() -> PreservationMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PreservationMetadatawhere
PreservationMetadata: Default,
impl<'de> Deserialize<'de> for PreservationMetadatawhere
PreservationMetadata: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PreservationMetadata
impl PartialEq for PreservationMetadata
Source§impl Serialize for PreservationMetadata
impl Serialize for PreservationMetadata
impl StructuralPartialEq for PreservationMetadata
Auto Trait Implementations§
impl Freeze for PreservationMetadata
impl RefUnwindSafe for PreservationMetadata
impl Send for PreservationMetadata
impl Sync for PreservationMetadata
impl Unpin for PreservationMetadata
impl UnsafeUnpin for PreservationMetadata
impl UnwindSafe for PreservationMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more