pub struct NodeId(/* private fields */);Expand description
Strongly-typed ID for "node" resources.
use daedalus_core::ids::NodeId;
let id = NodeId::try_from(1).unwrap();
assert_eq!(id.to_string(), "node:1");Implementations§
Source§impl NodeId
impl NodeId
pub const PREFIX: &'static str = "node"
pub fn new(raw: NonZeroU64) -> Self
pub fn get(self) -> NonZeroU64
pub fn into_inner(self) -> NonZeroU64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<NonZero<u64>> for NodeId
impl From<NonZero<u64>> for NodeId
Source§fn from(value: NonZeroU64) -> Self
fn from(value: NonZeroU64) -> Self
Converts to this type from the input type.
Source§impl Ord for NodeId
impl Ord for NodeId
Source§impl PartialOrd for NodeId
impl PartialOrd for NodeId
impl Copy for NodeId
impl Eq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
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