Untagged

Struct Untagged 

Source
pub struct Untagged;
Expand description

A marker for BitEncode implementors that don’t prepend their tag, and BitDecode implementors that usually have a tag, but can be read to EOF

Trait Implementations§

Source§

impl<Ctx, K, V> BitDecode<Ctx, Untagged> for BTreeMap<K, V>
where K: BitDecode<Ctx> + Ord, V: BitDecode<Ctx>,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T> BitDecode<Ctx, Untagged> for BTreeSet<T>
where T: BitDecode<Ctx> + Ord,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T> BitDecode<Ctx, Untagged> for BinaryHeap<T>
where T: BitDecode<Ctx> + Ord,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T> BitDecode<Ctx, Untagged> for Box<[T]>
where T: BitDecode<Ctx>,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx> BitDecode<Ctx, Untagged> for Box<str>

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, tag: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, K, V, H> BitDecode<Ctx, Untagged> for HashMap<K, V, H>
where K: BitDecode<Ctx> + Eq + Hash, V: BitDecode<Ctx>, H: BuildHasher + Default,

Available on crate feature std only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T, H> BitDecode<Ctx, Untagged> for HashSet<T, H>
where T: BitDecode<Ctx> + Hash + Eq, H: BuildHasher + Default,

Available on crate feature std only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T> BitDecode<Ctx, Untagged> for LinkedList<T>
where T: BitDecode<Ctx>,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx> BitDecode<Ctx, Untagged> for String

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T> BitDecode<Ctx, Untagged> for Vec<T>
where T: BitDecode<Ctx>,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, T> BitDecode<Ctx, Untagged> for VecDeque<T>
where T: BitDecode<Ctx>,

Available on crate feature alloc only.
Source§

fn decode<R, E>(read: &mut R, ctx: &mut Ctx, _: Untagged) -> Result<Self>
where R: BitRead, E: Endianness,

Reads self from a stream.
Source§

impl<Ctx, K, V> BitEncode<Ctx, Untagged> for BTreeMap<K, V>
where K: BitEncode<Ctx> + Ord, V: BitEncode<Ctx>,

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T> BitEncode<Ctx, Untagged> for BTreeSet<T>
where T: BitEncode<Ctx> + Ord,

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T> BitEncode<Ctx, Untagged> for BinaryHeap<T>
where T: BitEncode<Ctx> + Ord,

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, K, V, H> BitEncode<Ctx, Untagged> for HashMap<K, V, H>
where K: BitEncode<Ctx> + Eq + Hash, V: BitEncode<Ctx>,

Available on crate feature std only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T, H> BitEncode<Ctx, Untagged> for HashSet<T, H>
where T: BitEncode<Ctx> + Hash + Eq,

Available on crate feature std only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T> BitEncode<Ctx, Untagged> for LinkedList<T>
where T: BitEncode<Ctx>,

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T> BitEncode<Ctx, Untagged> for Option<T>
where T: BitEncode<Ctx>,

Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx> BitEncode<Ctx, Untagged> for String

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T> BitEncode<Ctx, Untagged> for Vec<T>
where T: BitEncode<Ctx>,

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.
Source§

impl<Ctx, T> BitEncode<Ctx, Untagged> for VecDeque<T>
where T: BitEncode<Ctx>,

Available on crate feature alloc only.
Source§

fn encode<W, E>(&self, write: &mut W, ctx: &mut Ctx, _: Untagged) -> Result<()>
where W: BitWrite, E: Endianness,

Writes a value to a stream.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.