pub struct DatabaseId(/* private fields */);
Expand description
Database ID is a locally public random byte array that can be used by the apps using this library to identify the database file. For example, if the app stores passwords externally (e.g. fingerprint biometric) it can do so under the DATABASE_ID as key. Note that the RepositoryId could - in theory - also be used for this purpose, but in case the database IDs are leaked to an adversary without the actual database files, the adversary will not be able to link the DATABASE_ID to a corresponding repository. For that reason database IDs may be preferable.
Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for DatabaseId
impl AsRef<[u8]> for DatabaseId
Source§impl Clone for DatabaseId
impl Clone for DatabaseId
Source§fn clone(&self) -> DatabaseId
fn clone(&self) -> DatabaseId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DatabaseId
impl Debug for DatabaseId
Source§impl Display for DatabaseId
impl Display for DatabaseId
Source§impl Distribution<DatabaseId> for Standard
impl Distribution<DatabaseId> for Standard
Source§impl Hash for DatabaseId
impl Hash for DatabaseId
Source§impl LowerHex for DatabaseId
impl LowerHex for DatabaseId
Source§impl Ord for DatabaseId
impl Ord for DatabaseId
Source§fn cmp(&self, other: &DatabaseId) -> Ordering
fn cmp(&self, other: &DatabaseId) -> Ordering
1.21.0 · 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 PartialEq for DatabaseId
impl PartialEq for DatabaseId
Source§impl PartialOrd for DatabaseId
impl PartialOrd for DatabaseId
Source§impl TryFrom<&[u8]> for DatabaseId
impl TryFrom<&[u8]> for DatabaseId
impl Copy for DatabaseId
impl Eq for DatabaseId
impl StructuralPartialEq for DatabaseId
Auto Trait Implementations§
impl Freeze for DatabaseId
impl RefUnwindSafe for DatabaseId
impl Send for DatabaseId
impl Sync for DatabaseId
impl Unpin for DatabaseId
impl UnwindSafe for DatabaseId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)