Struct libp2p_rendezvous::Namespace
source · pub struct Namespace(/* private fields */);
Implementations§
source§impl Namespace
impl Namespace
sourcepub fn from_static(value: &'static str) -> Self
pub fn from_static(value: &'static str) -> Self
Creates a new Namespace
from a static string.
This will panic if the namespace is too long. We accepting panicking in this case because we are enforcing a `static lifetime which means this value can only be a constant in the program and hence we hope the developer checked that it is of an acceptable length.
pub fn new(value: String) -> Result<Self, NamespaceTooLong>
Trait Implementations§
source§impl PartialEq<Namespace> for str
impl PartialEq<Namespace> for str
source§impl PartialEq for Namespace
impl PartialEq for Namespace
impl Eq for Namespace
impl StructuralEq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
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