pub struct FrameSender { /* private fields */ }Expand description
Sender half for producing frames into the stream.
Implementations§
Source§impl FrameSender
impl FrameSender
Sourcepub async fn send(&self, frame: StreamResult<Frame>) -> Result<(), StreamError>
pub async fn send(&self, frame: StreamResult<Frame>) -> Result<(), StreamError>
Send a frame to the stream (waits if buffer is full).
Sourcepub fn try_send(&self, frame: StreamResult<Frame>) -> Result<(), StreamError>
pub fn try_send(&self, frame: StreamResult<Frame>) -> Result<(), StreamError>
Try to send without waiting (returns error if buffer is full or closed).
Sourcepub fn has_capacity(&self) -> bool
pub fn has_capacity(&self) -> bool
Check if there’s capacity without blocking.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameSender
impl RefUnwindSafe for FrameSender
impl Send for FrameSender
impl Sync for FrameSender
impl Unpin for FrameSender
impl UnwindSafe for FrameSender
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