pub struct RunId(/* private fields */);Expand description
A validated run identifier: a lowercase ULID (26 Crockford base32
characters whose first character keeps the encoded timestamp within
ULID’s 48-bit range). Mirrors what crate::new_run_id emits.
Implementations§
Source§impl RunId
impl RunId
Sourcepub const LEN: usize = 26
pub const LEN: usize = 26
Canonical length of a ULID in Crockford base32. Public so CLI-side prefix resolution can branch on “full id vs. prefix” without mirroring the constant (which would silently drift if the id shape ever changed).
Sourcepub fn parse_str(s: &str) -> Result<Self, IdValidationError>
pub fn parse_str(s: &str) -> Result<Self, IdValidationError>
Parse and validate a run_id. Accepts only the 26-character lowercase
ULID shape; rejects wrong length, non-Crockford characters, and a first
character outside 0..=7 (which would overflow ULID’s 48-bit timestamp).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunId
impl<'de> Deserialize<'de> for RunId
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RunId
Source§impl Ord for RunId
impl Ord for RunId
1.21.0 (const: unstable) · 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 PartialOrd for RunId
impl PartialOrd for RunId
impl StructuralPartialEq for RunId
Auto Trait Implementations§
impl Freeze for RunId
impl RefUnwindSafe for RunId
impl Send for RunId
impl Sync for RunId
impl Unpin for RunId
impl UnsafeUnpin for RunId
impl UnwindSafe for RunId
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