[−][src]Struct interledger_packet::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.
fn try_from(bytes: Bytes) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ [u8]> for Address
[src]
type Error = ParseError
The type returned in the event of a conversion error.
fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>
[src]
impl FromStr for Address
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(src: &str) -> Result<Self, Self::Err>
[src]
impl Deref for Address
[src]
impl Hash for Address
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,