Struct libp2p_rendezvous::Namespace
source · [−]pub struct Namespace(_);
Implementations
sourceimpl 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
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
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