pub struct TickId(/* private fields */);Expand description
Strongly-typed ID for "tick" resources.
use daedalus_core::ids::TickId;
let id = TickId::try_from(1).unwrap();
assert_eq!(id.to_string(), "tick:1");Implementations§
Source§impl TickId
impl TickId
pub const PREFIX: &'static str = "tick"
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 TickId
impl<'de> Deserialize<'de> for TickId
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 TickId
impl From<NonZero<u64>> for TickId
Source§fn from(value: NonZeroU64) -> Self
fn from(value: NonZeroU64) -> Self
Converts to this type from the input type.
Source§impl Ord for TickId
impl Ord for TickId
Source§impl PartialOrd for TickId
impl PartialOrd for TickId
impl Copy for TickId
impl Eq for TickId
impl StructuralPartialEq for TickId
Auto Trait Implementations§
impl Freeze for TickId
impl RefUnwindSafe for TickId
impl Send for TickId
impl Sync for TickId
impl Unpin for TickId
impl UnwindSafe for TickId
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