Skip to main content

QueryableHeader

Trait QueryableHeader 

pub trait QueryableHeader<Types>: BlockHeader<Types> + HeightIndexed
where Types: NodeType,
{ type NamespaceIndex: Clone + Debug + Hash + PartialEq + Eq + From<i64> + Into<i64> + Send + Sync; type NamespaceId: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + Hash + PartialEq + Eq + Copy + From<i64> + Into<i64>; // Required methods fn namespace_id( &self, i: &Self::NamespaceIndex, ) -> Option<Self::NamespaceId>; fn namespace_size( &self, i: &Self::NamespaceIndex, payload_size: usize, ) -> u64; fn ns_table(&self) -> String; }

Required Associated Types§

type NamespaceIndex: Clone + Debug + Hash + PartialEq + Eq + From<i64> + Into<i64> + Send + Sync

Index for looking up a namespace.

type NamespaceId: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + Hash + PartialEq + Eq + Copy + From<i64> + Into<i64>

Serialized representation of a namespace.

Required Methods§

fn namespace_id(&self, i: &Self::NamespaceIndex) -> Option<Self::NamespaceId>

Resolve a namespace index to the serialized identifier for that namespace.

fn namespace_size(&self, i: &Self::NamespaceIndex, payload_size: usize) -> u64

Get the size taken up by the given namespace in the payload.

fn ns_table(&self) -> String

Get the namespace table as a VARCHAR.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§