pub struct Tag<T>(pub T);
Expand description
A marker for BitDecode
implementors that require a tag.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<Tag, Ctx, K, V> BitDecode<Ctx, Tag<Tag>> for BTreeMap<K, V>
impl<Tag, Ctx, K, V> BitDecode<Ctx, Tag<Tag>> for BTreeMap<K, V>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for BTreeSet<T>
impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for BTreeSet<T>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for BinaryHeap<T>
impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for BinaryHeap<T>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, K, V, H> BitDecode<Ctx, Tag<Tag>> for HashMap<K, V, H>
impl<Tag, Ctx, K, V, H> BitDecode<Ctx, Tag<Tag>> for HashMap<K, V, H>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T, H> BitDecode<Ctx, Tag<Tag>> for HashSet<T, H>
impl<Tag, Ctx, T, H> BitDecode<Ctx, Tag<Tag>> for HashSet<T, H>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for LinkedList<T>
impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for LinkedList<T>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for Option<T>
impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for Option<T>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx> BitDecode<Ctx, Tag<Tag>> for String
impl<Tag, Ctx> BitDecode<Ctx, Tag<Tag>> for String
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for Vec<T>
impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for Vec<T>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Source§impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for VecDeque<T>
impl<Tag, Ctx, T> BitDecode<Ctx, Tag<Tag>> for VecDeque<T>
Source§fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Tag<Tag>) -> Result<Self>where
R: BitRead,
E: Endianness,
Reads self from a stream.
Source§fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
fn decode_bytes_ctx<E>(
bytes: &[u8],
byte_order: E,
ctx: &mut Ctx,
tag: Tag,
) -> Result<Self>where
E: Endianness,
Parses a new value from its raw byte representation with provided context and tag.
Auto Trait Implementations§
impl<T> Freeze for Tag<T>where
T: Freeze,
impl<T> RefUnwindSafe for Tag<T>where
T: RefUnwindSafe,
impl<T> Send for Tag<T>where
T: Send,
impl<T> Sync for Tag<T>where
T: Sync,
impl<T> Unpin for Tag<T>where
T: Unpin,
impl<T> UnwindSafe for Tag<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