Struct nmt_rs::NamespaceId
source · pub struct NamespaceId<const NS_ID_SIZE: usize>(pub [u8; NS_ID_SIZE]);Expand description
A namespace identifier
Tuple Fields§
§0: [u8; NS_ID_SIZE]Implementations§
source§impl<const NS_ID_SIZE: usize> NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> NamespaceId<NS_ID_SIZE>
sourcepub const MAX_ID: NamespaceId<NS_ID_SIZE> = _
pub const MAX_ID: NamespaceId<NS_ID_SIZE> = _
The maximum possible namespace id
sourcepub const MAX_RESERVED_ID_ON_CELESTIA: NamespaceId<NS_ID_SIZE> = _
pub const MAX_RESERVED_ID_ON_CELESTIA: NamespaceId<NS_ID_SIZE> = _
In celestia, 256 namespaces are reserved for “system” data. This is the maximum reserved namespace.
sourcepub fn is_reserved_on_celestia(&self) -> bool
pub fn is_reserved_on_celestia(&self) -> bool
Indicates whether the namespace is reserved for system data on Celestia.
Trait Implementations§
source§impl<const NS_ID_SIZE: usize> Clone for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Clone for NamespaceId<NS_ID_SIZE>
source§fn clone(&self) -> NamespaceId<NS_ID_SIZE>
fn clone(&self) -> NamespaceId<NS_ID_SIZE>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<const NS_ID_SIZE: usize> Debug for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Debug for NamespaceId<NS_ID_SIZE>
source§impl<const NS_ID_SIZE: usize> Default for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Default for NamespaceId<NS_ID_SIZE>
source§impl<const NS_ID_SIZE: usize> Hash for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Hash for NamespaceId<NS_ID_SIZE>
source§impl<const NS_ID_SIZE: usize> Ord for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Ord for NamespaceId<NS_ID_SIZE>
source§fn cmp(&self, other: &NamespaceId<NS_ID_SIZE>) -> Ordering
fn cmp(&self, other: &NamespaceId<NS_ID_SIZE>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<const NS_ID_SIZE: usize> PartialEq for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> PartialEq for NamespaceId<NS_ID_SIZE>
source§impl<const NS_ID_SIZE: usize> PartialOrd for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> PartialOrd for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Copy for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Eq for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> StructuralPartialEq for NamespaceId<NS_ID_SIZE>
Auto Trait Implementations§
impl<const NS_ID_SIZE: usize> Freeze for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> RefUnwindSafe for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Send for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Sync for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> Unpin for NamespaceId<NS_ID_SIZE>
impl<const NS_ID_SIZE: usize> UnwindSafe for NamespaceId<NS_ID_SIZE>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)