pub struct ContactBook { /* private fields */ }Implementations§
Source§impl ContactBook
impl ContactBook
pub fn insert(&mut self, contact: Contact) -> Result<PeerId>
pub fn observe(&mut self, public: PublicIdentity) -> Result<PeerId>
pub fn get(&self, id: &PeerId) -> Option<&Contact>
pub fn get_mut(&mut self, id: &PeerId) -> Option<&mut Contact>
pub fn resolve(&self, spec: &str) -> Result<(PeerId, PublicIdentity)>
pub fn set_trust(&mut self, id: &PeerId, trust: TrustState)
pub fn all(&self) -> impl Iterator<Item = (&PeerId, &Contact)>
Trait Implementations§
Source§impl Debug for ContactBook
impl Debug for ContactBook
Source§impl Default for ContactBook
impl Default for ContactBook
Source§fn default() -> ContactBook
fn default() -> ContactBook
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContactBook
impl RefUnwindSafe for ContactBook
impl Send for ContactBook
impl Sync for ContactBook
impl Unpin for ContactBook
impl UnsafeUnpin for ContactBook
impl UnwindSafe for ContactBook
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