pub struct Endpoint { /* private fields */ }Expand description
The master endpoint API.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn new(config: Config) -> (Self, UnboundedReceiver<ClientMessage>)
pub fn new(config: Config) -> (Self, UnboundedReceiver<ClientMessage>)
Create and start a new master endpoint.
A background task is launched that manages the connection and the topology and automatically
switches over or reconnects in case of network or broker failure.
Return an Endpoint and a channel receiver for EDA and local messages.
The background task should be cleanly shutdown when not needed anymore with the Self::shutdown() method.
To use the Endpoint API, the client code should request a EndpointHandle with the Self::new_handle() method.
Sourcepub fn new_handle(&self) -> EndpointHandle
pub fn new_handle(&self) -> EndpointHandle
Create a new handle.
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
impl UnwindSafe for Endpoint
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