pub struct ContactId(/* private fields */);Implementations§
Source§impl ContactId
impl ContactId
Sourcepub unsafe fn from_raw_unchecked(id: i64) -> Self
pub unsafe fn from_raw_unchecked(id: i64) -> Self
§Safety
All SimpleX IDs are starting from 1 which is guaranteed by Sqlite and PostgreSQL DBs so it is generally safe to call this method when passing an ID value received from SimpleX backend.
In other cases of if in doubts - use from_raw for version that panics or Self::try_from for version that returns an error.
Sourcepub fn from_raw(id: i64) -> Self
pub fn from_raw(id: i64) -> Self
Panics when id == 0. Use Self::try_from to handle an error
pub fn raw(&self) -> i64
Trait Implementations§
impl Copy for ContactId
impl Eq for ContactId
Source§impl From<NonZero<i64>> for ContactId
impl From<NonZero<i64>> for ContactId
Source§fn from(id: NonZeroI64) -> Self
fn from(id: NonZeroI64) -> Self
Converts to this type from the input type.
Source§impl Ord for ContactId
impl Ord for ContactId
1.21.0 (const: unstable) · 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 PartialOrd for ContactId
impl PartialOrd for ContactId
impl StructuralPartialEq for ContactId
Auto Trait Implementations§
impl Freeze for ContactId
impl RefUnwindSafe for ContactId
impl Send for ContactId
impl Sync for ContactId
impl Unpin for ContactId
impl UnsafeUnpin for ContactId
impl UnwindSafe for ContactId
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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