INNER CODE UNIT · Rust

fmt

ekzhang/sshx · crates/sshx-core/src/lib.rs:37

    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}

/// Unique identifier for a user within the session.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
#[serde(transparent)]
pub struct Uid(pub u32);

impl Display for Uid {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}

/// A counter for generating unique identifiers.
#[derive(Debug)]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…