Struct libp2p_rendezvous::Cookie
source · [−]pub struct Cookie { /* private fields */ }
Implementations
sourceimpl Cookie
impl Cookie
sourcepub fn for_namespace(namespace: Namespace) -> Self
pub fn for_namespace(namespace: Namespace) -> Self
Construct a new Cookie
for a given namespace.
This cookie will only be valid for subsequent DISCOVER requests targeting the same namespace.
sourcepub fn for_all_namespaces() -> Self
pub fn for_all_namespaces() -> Self
Construct a new Cookie
for a DISCOVER request that inquires about all namespaces.
pub fn into_wire_encoding(self) -> Vec<u8>
pub fn from_wire_encoding(bytes: Vec<u8>) -> Result<Self, InvalidCookie>
pub fn namespace(&self) -> Option<&Namespace>
Trait Implementations
impl Eq for Cookie
impl StructuralEq for Cookie
impl StructuralPartialEq for Cookie
Auto Trait Implementations
impl RefUnwindSafe for Cookie
impl Send for Cookie
impl Sync for Cookie
impl Unpin for Cookie
impl UnwindSafe for Cookie
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
Mutably borrows from an owned value. Read more