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>
impl<'de, S: Service> Deserialize<'de> for Addr<S>
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
Auto Trait Implementations§
impl<S> Freeze for Addr<S>
impl<S> RefUnwindSafe for Addr<S>
impl<S> Send for Addr<S>
impl<S> Sync for Addr<S>
impl<S> Unpin for Addr<S>
impl<S> UnwindSafe for Addr<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more