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 duplicate 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