[−][src]Struct patricia_tree::node::NodeDecoder
[cfg(feature = "binary-format")]
Binary decoder for Node
.
Binary format
const FLAG_HAS_VALUE: u8 = 0b0000_0010;
const FLAG_HAS_CHILD: u8 = 0b0000_1000;
const FLAG_HAS_SIBLING: u8 = 0b0010_0000;
struct BinNode {
flags: u8,
label_len: u8,
level: u16 // Big Endian
label: [u8; label_len],
value: Option<V::Item>,
child: Option<Node>,
sibling: Option<Node>
}
Methods
impl<V: Decode> NodeDecoder<V>
[src]
Trait Implementations
impl<V: Default + Decode> Default for NodeDecoder<V> where
V::Item: Default,
V::Item: Default,
V::Item: Default,
[src]
V::Item: Default,
V::Item: Default,
V::Item: Default,
fn default() -> NodeDecoder<V>
[src]
impl<V: Debug + Decode> Debug for NodeDecoder<V> where
V::Item: Debug,
V::Item: Debug,
V::Item: Debug,
[src]
V::Item: Debug,
V::Item: Debug,
V::Item: Debug,
impl<V: Decode> Decode for NodeDecoder<V>
[src]
Auto Trait Implementations
impl<V> Send for NodeDecoder<V> where
V: Send,
V: Send,
impl<V> !Sync for NodeDecoder<V>
impl<V> Unpin for NodeDecoder<V> where
V: Unpin,
<V as Decode>::Item: Unpin,
V: Unpin,
<V as Decode>::Item: Unpin,
impl<V> UnwindSafe for NodeDecoder<V> where
V: UnwindSafe,
<V as Decode>::Item: UnwindSafe,
V: UnwindSafe,
<V as Decode>::Item: UnwindSafe,
impl<V> RefUnwindSafe for NodeDecoder<V> where
V: RefUnwindSafe,
<V as Decode>::Item: RefUnwindSafe,
V: RefUnwindSafe,
<V as Decode>::Item: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IoDecodeExt for T where
T: Decode,
T: Decode,
fn decode_from_read_buf<B>(&mut self, buf: &mut ReadBuf<B>) -> Result<(), Error> where
B: AsRef<[u8]>,
B: AsRef<[u8]>,
fn decode_exact<R>(&mut self, reader: R) -> Result<Self::Item, Error> where
R: Read,
R: Read,
impl<T> DecodeExt for T where
T: Decode,
T: Decode,
fn map<T, F>(self, f: F) -> Map<Self, T, F> where
F: Fn(Self::Item) -> T,
F: Fn(Self::Item) -> T,
fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F> where
F: Fn(Self::Item) -> Result<T, E>,
Error: From<E>,
F: Fn(Self::Item) -> Result<T, E>,
Error: From<E>,
fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F> where
F: Fn(Error) -> E,
Error: From<E>,
F: Fn(Error) -> E,
Error: From<E>,
fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F> where
D: Decode,
F: Fn(Self::Item) -> D,
D: Decode,
F: Fn(Self::Item) -> D,
fn collect<T>(self) -> Collect<Self, T> where
T: Extend<Self::Item> + Default,
T: Extend<Self::Item> + Default,
fn collectn<T>(self, n: usize) -> CollectN<Self, T> where
T: Extend<Self::Item> + Default,
T: Extend<Self::Item> + Default,
fn length(self, expected_bytes: u64) -> Length<Self>
fn omit(self, do_omit: bool) -> Omittable<Self>
fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
fn chain<T>(self, other: T) -> TupleDecoder<(Self, T)> where
T: Decode,
T: Decode,