[−][src]Struct cjdns_core::RoutingLabel
Routing label (a sequence of encoded Directors).
For more information on labels please refer to the whitepaper.
Implementations
impl<L: LabelBits> RoutingLabel<L>
[src]
pub fn try_new(bits: L) -> Option<Self>
[src]
Create new non-zero routing label. Returns None
if bits
is zero.
pub fn self_reference() -> Self
[src]
Create a new label which is a self-reference.
Corresponds to director with value of 1
.
pub fn bits(&self) -> L
[src]
Raw data of this routing label. Always non-zero.
pub fn size(&self) -> usize
[src]
Size in bytes of this routing label
Trait Implementations
impl Binary for RoutingLabel<u32>
[src]
impl Binary for RoutingLabel<u64>
[src]
impl Binary for RoutingLabel<u128>
[src]
impl<L: Clone + LabelBits> Clone for RoutingLabel<L>
[src]
fn clone(&self) -> RoutingLabel<L>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<L: Copy + LabelBits> Copy for RoutingLabel<L>
[src]
impl<L: Debug + LabelBits> Debug for RoutingLabel<L>
[src]
impl Display for RoutingLabel<u32>
[src]
impl Display for RoutingLabel<u64>
[src]
impl Display for RoutingLabel<u128>
[src]
impl<L: Eq + LabelBits> Eq for RoutingLabel<L>
[src]
impl LowerHex for RoutingLabel<u32>
[src]
impl LowerHex for RoutingLabel<u64>
[src]
impl LowerHex for RoutingLabel<u128>
[src]
impl<L: PartialEq + LabelBits> PartialEq<RoutingLabel<L>> for RoutingLabel<L>
[src]
fn eq(&self, other: &RoutingLabel<L>) -> bool
[src]
fn ne(&self, other: &RoutingLabel<L>) -> bool
[src]
impl<L: LabelBits> StructuralEq for RoutingLabel<L>
[src]
impl<L: LabelBits> StructuralPartialEq for RoutingLabel<L>
[src]
impl<'_> TryFrom<&'_ str> for RoutingLabel<u32>
[src]
type Error = LabelError
The type returned in the event of a conversion error.
fn try_from(value: &str) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ str> for RoutingLabel<u64>
[src]
type Error = LabelError
The type returned in the event of a conversion error.
fn try_from(value: &str) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ str> for RoutingLabel<u128>
[src]
type Error = LabelError
The type returned in the event of a conversion error.
fn try_from(value: &str) -> Result<Self, Self::Error>
[src]
impl UpperHex for RoutingLabel<u32>
[src]
impl UpperHex for RoutingLabel<u64>
[src]
impl UpperHex for RoutingLabel<u128>
[src]
Auto Trait Implementations
impl<L> RefUnwindSafe for RoutingLabel<L> where
L: RefUnwindSafe,
L: RefUnwindSafe,
impl<L> Send for RoutingLabel<L> where
L: Send,
L: Send,
impl<L> Sync for RoutingLabel<L> where
L: Sync,
L: Sync,
impl<L> Unpin for RoutingLabel<L> where
L: Unpin,
L: Unpin,
impl<L> UnwindSafe for RoutingLabel<L> where
L: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,