Struct fortresscrypto::LoginId
source · [−]Tuple Fields
0: [u8; 32]
Implementations
sourceimpl LoginId
impl LoginId
sourcepub fn from_slice(bs: &[u8]) -> Option<LoginId>
pub fn from_slice(bs: &[u8]) -> Option<LoginId>
from_slice()
creates an object from a byte slice
This function will fail and return None
if the length of
the byte-s;ice isn’t equal to the length of the object
pub fn from_rng<R: Rng + ?Sized>(rng: &mut R) -> LoginId
pub fn to_hex(&self) -> String
Trait Implementations
sourceimpl ConstantTimeEq for LoginId
impl ConstantTimeEq for LoginId
sourceimpl<'de> Deserialize<'de> for LoginId
impl<'de> Deserialize<'de> for LoginId
sourcefn deserialize<D>(deserializer: D) -> Result<LoginId, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<LoginId, D::Error>where
D: Deserializer<'de>,
sourceimpl Distribution<LoginId> for Standard
impl Distribution<LoginId> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> LoginId
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> LoginId
T
, using rng
as the source of randomness.sourceimpl Index<Range<usize>> for LoginId
impl Index<Range<usize>> for LoginId
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..b] == y[a..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Index<RangeFrom<usize>> for LoginId
impl Index<RangeFrom<usize>> for LoginId
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..] == y[a..]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Index<RangeFull> for LoginId
impl Index<RangeFull> for LoginId
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[] == y[]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Index<RangeTo<usize>> for LoginId
impl Index<RangeTo<usize>> for LoginId
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[..b] == y[..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Ord for LoginId
impl Ord for LoginId
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<LoginId> for LoginId
impl PartialOrd<LoginId> for LoginId
sourcefn partial_cmp(&self, other: &LoginId) -> Option<Ordering>
fn partial_cmp(&self, other: &LoginId) -> Option<Ordering>
sourcefn le(&self, other: &LoginId) -> bool
fn le(&self, other: &LoginId) -> bool
self
and other
) and is used by the <=
operator. Read more