#[repr(C)]pub enum IdentityChange {
NewOrUnchanged = 0,
ReplacedExisting = 1,
}
Expand description
The result of saving a new identity key for a protocol address.
Variants§
NewOrUnchanged = 0
The protocol address didn’t have an identity key or had the same key.
ReplacedExisting = 1
The new identity key replaced a different key for the protocol address.
Implementations§
Source§impl IdentityChange
impl IdentityChange
Sourcepub fn from_changed(changed: bool) -> Self
pub fn from_changed(changed: bool) -> Self
Convenience constructor from a boolean changed
flag.
Returns IdentityChange::ReplacedExisting
if changed
is true
,
otherwise IdentityChange::NewOrUnchanged
.
Trait Implementations§
Source§impl Clone for IdentityChange
impl Clone for IdentityChange
Source§fn clone(&self) -> IdentityChange
fn clone(&self) -> IdentityChange
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 IdentityChange
impl Debug for IdentityChange
Source§impl PartialEq for IdentityChange
impl PartialEq for IdentityChange
Source§impl TryFrom<isize> for IdentityChange
impl TryFrom<isize> for IdentityChange
impl Copy for IdentityChange
impl Eq for IdentityChange
impl StructuralPartialEq for IdentityChange
Auto Trait Implementations§
impl Freeze for IdentityChange
impl RefUnwindSafe for IdentityChange
impl Send for IdentityChange
impl Sync for IdentityChange
impl Unpin for IdentityChange
impl UnwindSafe for IdentityChange
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> 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<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 more