pub enum PreOffsetStrategy {
Absolute,
Padded,
Relative,
}Expand description
How a pre-offset modifier interprets its offset value before serialising the wrapped type.
Variants§
Absolute
Move the cursor to the absolute byte position given by the offset.
Padded
Pad with zero bytes from the current cursor up to the offset bytes ahead.
Relative
Advance the cursor by the offset bytes relative to its current position.
Trait Implementations§
Source§impl Clone for PreOffsetStrategy
impl Clone for PreOffsetStrategy
Source§fn clone(&self) -> PreOffsetStrategy
fn clone(&self) -> PreOffsetStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PreOffsetStrategy
Source§impl Debug for PreOffsetStrategy
impl Debug for PreOffsetStrategy
Source§impl<'de> Deserialize<'de> for PreOffsetStrategy
impl<'de> Deserialize<'de> for PreOffsetStrategy
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
impl Eq for PreOffsetStrategy
Source§impl PartialEq for PreOffsetStrategy
impl PartialEq for PreOffsetStrategy
Source§impl Serialize for PreOffsetStrategy
impl Serialize for PreOffsetStrategy
impl StructuralPartialEq for PreOffsetStrategy
Auto Trait Implementations§
impl Freeze for PreOffsetStrategy
impl RefUnwindSafe for PreOffsetStrategy
impl Send for PreOffsetStrategy
impl Sync for PreOffsetStrategy
impl Unpin for PreOffsetStrategy
impl UnsafeUnpin for PreOffsetStrategy
impl UnwindSafe for PreOffsetStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.