[][src]Struct patricia_tree::node::NodeDecoder

pub struct NodeDecoder<V: Decode> { /* fields omitted */ }

[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]

pub fn new(value_decoder: V) -> Self[src]

Makes a new NodeDecoder instance.

Trait Implementations

impl<V: Default + Decode> Default for NodeDecoder<V> where
    V::Item: Default,
    V::Item: Default,
    V::Item: Default
[src]

impl<V: Debug + Decode> Debug for NodeDecoder<V> where
    V::Item: Debug,
    V::Item: Debug,
    V::Item: Debug
[src]

impl<V: Decode> Decode for NodeDecoder<V>[src]

type Item = Node<V::Item>

The type of items to be decoded.

Auto Trait Implementations

impl<V> Send for NodeDecoder<V> where
    V: Send

impl<V> !Sync for NodeDecoder<V>

impl<V> Unpin for NodeDecoder<V> where
    V: Unpin,
    <V as Decode>::Item: Unpin

impl<V> UnwindSafe for NodeDecoder<V> where
    V: UnwindSafe,
    <V as Decode>::Item: UnwindSafe

impl<V> RefUnwindSafe for NodeDecoder<V> where
    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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IoDecodeExt for T where
    T: Decode, 

impl<T> DecodeExt for T where
    T: Decode,