pub trait QueryableHeader<Types: NodeType>: BlockHeader<Types> {
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;
}
Required Associated Types§
Required Methods§
Sourcefn namespace_id(&self, i: &Self::NamespaceIndex) -> Option<Self::NamespaceId>
fn namespace_id(&self, i: &Self::NamespaceIndex) -> Option<Self::NamespaceId>
Resolve a namespace index to the serialized identifier for that namespace.
Sourcefn namespace_size(&self, i: &Self::NamespaceIndex, payload_size: usize) -> u64
fn namespace_size(&self, i: &Self::NamespaceIndex, payload_size: usize) -> u64
Get the size taken up by the given namespace in the payload.
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.