Expand description
An OwnedNode
is an owned type from which a Node
can be constructed which borrows data from
the OwnedNode
. This is useful for trie iterators.
Implementations
sourceimpl<D: Borrow<[u8]>> OwnedNode<D>
impl<D: Borrow<[u8]>> OwnedNode<D>
sourcepub fn new<C: NodeCodec>(data: D) -> Result<Self, C::Error>
pub fn new<C: NodeCodec>(data: D) -> Result<Self, C::Error>
Construct an OwnedNode
by decoding an owned data source according to some codec.
sourcepub fn data(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn data(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Returns a reference to the backing data.
sourcepub fn node_plan_mut(&mut self) -> &mut NodePlan
pub fn node_plan_mut(&mut self) -> &mut NodePlan
Returns a mutable reference to the node decode plan.
Trait Implementations
impl<D: Eq + Borrow<[u8]>> Eq for OwnedNode<D>
impl<D: Borrow<[u8]>> StructuralEq for OwnedNode<D>
impl<D: Borrow<[u8]>> StructuralPartialEq for OwnedNode<D>
Auto Trait Implementations
impl<D> RefUnwindSafe for OwnedNode<D> where
D: RefUnwindSafe,
impl<D> Send for OwnedNode<D> where
D: Send,
impl<D> Sync for OwnedNode<D> where
D: Sync,
impl<D> Unpin for OwnedNode<D> where
D: Unpin,
impl<D> UnwindSafe for OwnedNode<D> where
D: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more