Struct libfortress::ID
source · [−]Tuple Fields
0: [u8; 32]
Implementations
sourceimpl ID
impl ID
sourcepub fn from_slice(bs: &[u8]) -> Option<ID>
pub fn from_slice(bs: &[u8]) -> Option<ID>
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) -> ID
pub fn to_hex(&self) -> String
Trait Implementations
sourceimpl ConstantTimeEq for ID
impl ConstantTimeEq for ID
sourceimpl<'de> Deserialize<'de> for ID
impl<'de> Deserialize<'de> for ID
sourcefn deserialize<D>(deserializer: D) -> Result<ID, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ID, D::Error>where
D: Deserializer<'de>,
sourceimpl Distribution<ID> for Standard
impl Distribution<ID> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> ID
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> ID
T
, using rng
as the source of randomness.sourceimpl Index<Range<usize>> for ID
impl Index<Range<usize>> for ID
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 ID
impl Index<RangeFrom<usize>> for ID
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 ID
impl Index<RangeFull> for ID
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 ID
impl Index<RangeTo<usize>> for ID
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 ID
impl Ord for ID
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<ID> for ID
impl PartialOrd<ID> for ID
sourcefn partial_cmp(&self, other: &ID) -> Option<Ordering>
fn partial_cmp(&self, other: &ID) -> Option<Ordering>
sourcefn le(&self, other: &ID) -> bool
fn le(&self, other: &ID) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ID
impl Eq for ID
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.