pub struct RunId { /* private fields */ }Expand description
A run’s id: 128 bits, written as exactly 32 lowercase hexadecimal digits.
Text becomes one only through RunId::parse, so an id read from a
history, a frame or a command line that has any other form is refused
where it is read. Ids order as their written digits do. It keeps its
digits beside its bits, so it is Copy and lends them as text without
allocating.
Implementations§
Source§impl RunId
impl RunId
Sourcepub fn parse(text: &str) -> Result<RunId, ParsePlaceError>
pub fn parse(text: &str) -> Result<RunId, ParsePlaceError>
The run id text is.
§Errors
A ParsePlaceError when text is not exactly 32 lowercase
hexadecimal digits.
Sourcepub fn bits(&self) -> [u8; 16]
pub fn bits(&self) -> [u8; 16]
Its 16 bits, most significant byte first, as RunId::from_bits
reads them.
Trait Implementations§
impl Copy for RunId
Source§impl<'de> Deserialize<'de> for RunId
impl<'de> Deserialize<'de> for RunId
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<RunId, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<RunId, 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RunId
impl PartialOrd for RunId
impl StructuralPartialEq for RunId
Auto Trait Implementations§
impl Forget for RunId
impl Freeze for RunId
impl Move 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