Struct cameleon::payload::PayloadSender
source · pub struct PayloadSender { /* private fields */ }
Expand description
A sender of the Payload
which is sent to the host.
Implementations§
source§impl PayloadSender
impl PayloadSender
sourcepub async fn send(&self, payload: StreamResult<Payload>) -> StreamResult<()>
pub async fn send(&self, payload: StreamResult<Payload>) -> StreamResult<()>
Sends Payload
to the host.
sourcepub fn try_send(&self, payload: StreamResult<Payload>) -> StreamResult<()>
pub fn try_send(&self, payload: StreamResult<Payload>) -> StreamResult<()>
Tries to send Payload
to the host.
Returns StreamError
if the channel is full or empty.
sourcepub fn try_recv(&self) -> StreamResult<Payload>
pub fn try_recv(&self) -> StreamResult<Payload>
Tries to receive Payload
.
This method doesn’t wait arrival of payload
and immediately returns StreamError
if
the channel is empty.
Trait Implementations§
source§impl Clone for PayloadSender
impl Clone for PayloadSender
source§fn clone(&self) -> PayloadSender
fn clone(&self) -> PayloadSender
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for PayloadSender
impl Send for PayloadSender
impl Sync for PayloadSender
impl Unpin for PayloadSender
impl UnwindSafe for PayloadSender
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