iroh_relay::node_info

Trait NodeIdExt

Source
pub trait NodeIdExt {
    // Required methods
    fn to_z32(&self) -> String;
    fn from_z32(s: &str) -> Result<NodeId>;
}
Expand description

Extension methods for NodeId to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.

Required Methods§

Source

fn to_z32(&self) -> String

Encodes a NodeId in [z-base-32] encoding.

Source

fn from_z32(s: &str) -> Result<NodeId>

Parses a NodeId from [z-base-32] encoding.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NodeIdExt for NodeId

Implementors§