Struct sc_service::config::MultiaddrWithPeerId[][src]

pub struct MultiaddrWithPeerId {
    pub multiaddr: Multiaddr,
    pub peer_id: PeerId,

Address of a node, including its identity.

This struct represents a decoded version of a multiaddress that ends with /p2p/<peerid>.


let addr: MultiaddrWithPeerId =
assert_eq!(addr.peer_id.to_base58(), "QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV");
assert_eq!(addr.multiaddr.to_string(), "/ip4/");


multiaddr: Multiaddr

Address of the node.

peer_id: PeerId

Its identity.


impl MultiaddrWithPeerId[src]

pub fn concat(&self) -> Multiaddr[src]

Concatenates the multiaddress and peer ID into one multiaddress containing both.

Trait Implementations

impl Clone for MultiaddrWithPeerId[src]

impl Debug for MultiaddrWithPeerId[src]

impl<'de> Deserialize<'de> for MultiaddrWithPeerId[src]

impl Display for MultiaddrWithPeerId[src]

impl FromStr for MultiaddrWithPeerId[src]

type Err = ParseErr

The associated error which can be returned from parsing.

impl Serialize for MultiaddrWithPeerId[src]

impl TryFrom<String> for MultiaddrWithPeerId[src]

type Error = ParseErr

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for MultiaddrWithPeerId

impl Send for MultiaddrWithPeerId

impl Sync for MultiaddrWithPeerId

impl Unpin for MultiaddrWithPeerId

impl UnwindSafe for MultiaddrWithPeerId

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> CheckedConversion for T[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> DynClone for T where
    T: Clone

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> Erased for T[src]

impl<T> Error for T where
    T: 'static + Debug + Display + Send + Sync

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDisplay for T where
    T: Display

impl<T> MaybeFromStr for T where
    T: FromStr

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> MaybeSerialize for T where
    T: Serialize

impl<T> MaybeSerializeDeserialize for T where
    T: DeserializeOwned + Serialize