Enum iroh_rpc_types::addr::Addr
source · pub enum Addr<S: Service> {
Irpc(SocketAddr),
IrpcLookup(String),
Mem(ServerChannel<S::Req, S::Res>, ClientChannel<S::Res, S::Req>),
}
Expand description
An address. This can be either a memory address, already containing the channel, or a network address which will have to be opened.
Variants§
Irpc(SocketAddr)
IrpcLookup(String)
Mem(ServerChannel<S::Req, S::Res>, ClientChannel<S::Res, S::Req>)
Implementations§
source§impl<S: Service> Addr<S>
impl<S: Service> Addr<S>
pub fn try_as_socket_addr(&self) -> Option<SocketAddr>
Trait Implementations§
source§impl<'de, S: Service> Deserialize<'de> for Addr<S>where
Self: FromStr,
<Self as FromStr>::Err: Display,
impl<'de, S: Service> Deserialize<'de> for Addr<S>where
Self: FromStr,
<Self as FromStr>::Err: Display,
source§fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more