pub struct Init { /* private fields */ }Expand description
A helper structure for initializing protocol instance
Implementations§
Source§impl Init
impl Init
Sourcepub fn from_connection<T>(self, conn: T, handle: &Handle) -> Proto<T>
pub fn from_connection<T>(self, conn: T, handle: &Handle) -> Proto<T>
Wrap existing connection into a future that implements carbon protocol
Source§impl Init
impl Init
Sourcepub fn connect_to<S>(self, address_stream: S, handle: &Handle)
pub fn connect_to<S>(self, address_stream: S, handle: &Handle)
Establishes connections to all the hosts
This method spawns a future (or futures) in the loop represented
by handle. The future exits when all references to API (Carbon
structure) are dropped and all buffers are flushed.
Auto Trait Implementations§
impl Freeze for Init
impl !RefUnwindSafe for Init
impl Send for Init
impl Sync for Init
impl Unpin for Init
impl !UnwindSafe for Init
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