#[repr(transparent)]pub struct Sequence<T>(pub T);Expand description
Ensures that the given value T is encoded as a sequence.
This exists as a simple shim for certain types, to ensure they’re encoded as
a sequence, such as Sequence<()>.
Tuple Fields§
§0: TImplementations§
Trait Implementations§
Source§impl<'de, M, A> Decode<'de, M, A> for Sequence<()>where
A: Allocator,
impl<'de, M, A> Decode<'de, M, A> for Sequence<()>where
A: Allocator,
Source§const IS_BITWISE_DECODE: bool = true
const IS_BITWISE_DECODE: bool = true
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl<M> Encode<M> for Sequence<()>
impl<M> Encode<M> for Sequence<()>
Source§const IS_BITWISE_ENCODE: bool = true
const IS_BITWISE_ENCODE: bool = true
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl<T: Ord> Ord for Sequence<T>
impl<T: Ord> Ord for Sequence<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Sequence<T>
impl<T: PartialOrd> PartialOrd for Sequence<T>
impl<T: Copy> Copy for Sequence<T>
impl<T: Eq> Eq for Sequence<T>
impl<T> StructuralPartialEq for Sequence<T>
Auto Trait Implementations§
impl<T> Freeze for Sequence<T>where
T: Freeze,
impl<T> RefUnwindSafe for Sequence<T>where
T: RefUnwindSafe,
impl<T> Send for Sequence<T>where
T: Send,
impl<T> Sync for Sequence<T>where
T: Sync,
impl<T> Unpin for Sequence<T>where
T: Unpin,
impl<T> UnwindSafe for Sequence<T>where
T: UnwindSafe,
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