pub struct ConnectionInterface { /* private fields */ }
Expand description
The reciprocal of ConnectionHandle
.
Implementations§
Source§impl ConnectionInterface
impl ConnectionInterface
Sourcepub fn send_to_frontend(
&self,
item: PubSubItem,
) -> Result<(), SendError<PubSubItem>>
pub fn send_to_frontend( &self, item: PubSubItem, ) -> Result<(), SendError<PubSubItem>>
Send a pubsub item to the frontend.
Sourcepub async fn recv_from_frontend(&mut self) -> Option<Box<RawValue>>
pub async fn recv_from_frontend(&mut self) -> Option<Box<RawValue>>
Receive a request from the frontend. Ensures that if the frontend has dropped or issued a shutdown instruction, the backend sees no more requests.
Sourcepub fn close_with_error(self)
pub fn close_with_error(self)
Close the interface, sending an error to the frontend.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectionInterface
impl !RefUnwindSafe for ConnectionInterface
impl Send for ConnectionInterface
impl Sync for ConnectionInterface
impl Unpin for ConnectionInterface
impl !UnwindSafe for ConnectionInterface
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