[][src]Struct interledger_packet::Address

pub struct Address(_);

An ILP address backed by Bytes.

Methods

impl Address[src]

pub fn len(&self) -> usize[src]

Returns the length of the ILP Address.

pub fn to_bytes(&self) -> Bytes[src]

Returns the Bytes conversion of the ILP Address

pub unsafe fn new_unchecked(bytes: Bytes) -> Self[src]

Creates an ILP address without validating the bytes.

Safety

The given bytes must be a valid ILP address.

pub fn segments(&self) -> impl DoubleEndedIterator<Item = &str>[src]

Returns an iterator over all the segments of the ILP Address

pub fn scheme(&self) -> &str[src]

Returns the first segment of the address, which is the scheme. See `IL-RFC 15: ILP Addresses

pub fn with_suffix(&self, suffix: &[u8]) -> Result<Address, ParseError>[src]

Suffixes the ILP Address with the provided suffix. Includes a '.' separator

Trait Implementations

impl AsRef<[u8]> for Address[src]

impl AsRef<Bytes> for Address[src]

impl Clone for Address[src]

impl Eq for Address[src]

impl PartialEq<Address> for Address[src]

impl<'a> PartialEq<[u8]> for Address[src]

impl Display for Address[src]

impl Debug for Address[src]

impl TryFrom<Bytes> for Address[src]

type Error = ParseError

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ [u8]> for Address[src]

type Error = ParseError

The type returned in the event of a conversion error.

impl FromStr for Address[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Deref for Address[src]

type Target = str

The resulting type after dereferencing.

impl Hash for Address[src]

impl StructuralPartialEq for Address[src]

impl StructuralEq for Address[src]

Auto Trait Implementations

impl Send for Address

impl Sync for Address

impl Unpin for Address

impl UnwindSafe for Address

impl RefUnwindSafe for Address

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToHex for T where
    T: AsRef<[u8]>, 
[src]