Trait nuts_backend::BlockId

source ·
pub trait BlockId: Clone + Debug + Display + FromBytes + FromStr + PartialEq + ToBytes {
    // Required methods
    fn null() -> Self;
    fn is_null(&self) -> bool;
    fn size() -> usize;
}
Expand description

Trait identifies a block in the storage.

Required Methods§

source

fn null() -> Self

Creates a null-id.

A null-id does not point to a block. It points to nowhere.

source

fn is_null(&self) -> bool

Tests whether this id is a null-id.

source

fn size() -> usize

Returns the number of bytes needed to store the id.

Object Safety§

This trait is not object safe.

Implementors§