pub struct Plug<I, O> { /* private fields */ }Expand description
A type-safe connection endpoint with a name.
Implementations§
Source§impl<I, O> Plug<I, O>
impl<I, O> Plug<I, O>
Sourcepub async fn connect(
self,
address: impl ToSocketAddrs,
) -> Result<Connection<I, O>>
pub async fn connect( self, address: impl ToSocketAddrs, ) -> Result<Connection<I, O>>
Connects to the Plug in the given server address, producing a type-safe Connection.
Trait Implementations§
impl<I: Copy, O: Copy> Copy for Plug<I, O>
Auto Trait Implementations§
impl<I, O> Freeze for Plug<I, O>
impl<I, O> RefUnwindSafe for Plug<I, O>where
I: RefUnwindSafe,
O: RefUnwindSafe,
impl<I, O> Send for Plug<I, O>
impl<I, O> Sync for Plug<I, O>
impl<I, O> Unpin for Plug<I, O>
impl<I, O> UnwindSafe for Plug<I, O>where
I: UnwindSafe,
O: UnwindSafe,
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