pub enum PostOffsetStrategy {
Absolute,
Padded,
PreOffset,
Relative,
}Expand description
How a post-offset modifier interprets its offset value after 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.
PreOffset
Restore the cursor to where it was before the wrapped type ran (cancelling its pre-offset).
Relative
Advance the cursor by the offset bytes relative to its current position.
Trait Implementations§
Source§impl Clone for PostOffsetStrategy
impl Clone for PostOffsetStrategy
Source§fn clone(&self) -> PostOffsetStrategy
fn clone(&self) -> PostOffsetStrategy
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 PostOffsetStrategy
Source§impl Debug for PostOffsetStrategy
impl Debug for PostOffsetStrategy
Source§impl<'de> Deserialize<'de> for PostOffsetStrategy
impl<'de> Deserialize<'de> for PostOffsetStrategy
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 PostOffsetStrategy
Source§impl PartialEq for PostOffsetStrategy
impl PartialEq for PostOffsetStrategy
Source§impl Serialize for PostOffsetStrategy
impl Serialize for PostOffsetStrategy
impl StructuralPartialEq for PostOffsetStrategy
Auto Trait Implementations§
impl Freeze for PostOffsetStrategy
impl RefUnwindSafe for PostOffsetStrategy
impl Send for PostOffsetStrategy
impl Sync for PostOffsetStrategy
impl Unpin for PostOffsetStrategy
impl UnsafeUnpin for PostOffsetStrategy
impl UnwindSafe for PostOffsetStrategy
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.