pub struct OutgoingStreamManager { /* private fields */ }Implementations§
Source§impl OutgoingStreamManager
impl OutgoingStreamManager
pub fn new() -> (Self, UnboundedRequestReceiver<DataPacket, Result<(), SendError>>)
pub async fn stream_text( &self, options: StreamTextOptions, ) -> StreamResult<TextStreamWriter>
pub async fn stream_bytes( &self, options: StreamByteOptions, ) -> StreamResult<ByteStreamWriter>
pub async fn send_text( &self, text: &str, options: StreamTextOptions, ) -> StreamResult<TextStreamInfo>
Sourcepub async fn send_bytes(
&self,
data: impl AsRef<[u8]>,
options: StreamByteOptions,
) -> StreamResult<ByteStreamInfo>
pub async fn send_bytes( &self, data: impl AsRef<[u8]>, options: StreamByteOptions, ) -> StreamResult<ByteStreamInfo>
Send bytes to participants in the room.
This method sends an in-memory blob of bytes to participants in the room as a byte stream. It opens a stream using the provided options, writes the entire buffer, and closes the stream before returning.
The total_length in the header is set from the provided data and is not
overridable by options.total_length.
pub async fn send_file( &self, path: impl AsRef<Path>, options: StreamByteOptions, ) -> StreamResult<ByteStreamInfo>
Trait Implementations§
Source§impl Clone for OutgoingStreamManager
impl Clone for OutgoingStreamManager
Source§fn clone(&self) -> OutgoingStreamManager
fn clone(&self) -> OutgoingStreamManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for OutgoingStreamManager
impl RefUnwindSafe for OutgoingStreamManager
impl Send for OutgoingStreamManager
impl Sync for OutgoingStreamManager
impl Unpin for OutgoingStreamManager
impl UnsafeUnpin for OutgoingStreamManager
impl UnwindSafe for OutgoingStreamManager
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