pub struct MemoryStreamingChannel { /* private fields */ }Expand description
Memory-based streaming channel implementation
Implementations§
Source§impl MemoryStreamingChannel
impl MemoryStreamingChannel
Sourcepub fn new(id: impl Into<String>, config: StreamingChannelConfig) -> Self
pub fn new(id: impl Into<String>, config: StreamingChannelConfig) -> Self
Create a new memory-based streaming channel
Trait Implementations§
Source§impl Clone for MemoryStreamingChannel
impl Clone for MemoryStreamingChannel
Source§fn clone(&self) -> MemoryStreamingChannel
fn clone(&self) -> MemoryStreamingChannel
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 moreSource§impl StreamingChannel for MemoryStreamingChannel
impl StreamingChannel for MemoryStreamingChannel
Source§fn config(&self) -> &StreamingChannelConfig
fn config(&self) -> &StreamingChannelConfig
Get the channel configuration
Source§fn stats(&self) -> StreamingStats
fn stats(&self) -> StreamingStats
Get the streaming statistics
impl StreamingChannel2Way for MemoryStreamingChannel
Source§impl StreamingInput for MemoryStreamingChannel
impl StreamingInput for MemoryStreamingChannel
Source§fn send_chunk<'life0, 'async_trait>(
&'life0 self,
chunk: StreamChunk,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_chunk<'life0, 'async_trait>(
&'life0 self,
chunk: StreamChunk,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a chunk to the guest
Source§fn send_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
is_final: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
is_final: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send raw bytes to the guest
Source§fn send_stream<'life0, 'life1, 'async_trait, S>(
&'life0 self,
stream: &'life1 mut S,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
S: Stream<Item = Result<StreamChunk>> + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_stream<'life0, 'life1, 'async_trait, S>(
&'life0 self,
stream: &'life1 mut S,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
S: Stream<Item = Result<StreamChunk>> + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a stream of chunks to the guest
Source§impl StreamingOutput for MemoryStreamingChannel
impl StreamingOutput for MemoryStreamingChannel
Source§fn receive_chunk<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StreamChunk>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive_chunk<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StreamChunk>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive a chunk from the guest
Source§fn receive_bytes<'life0, 'async_trait>(
&'life0 self,
max_size: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive_bytes<'life0, 'async_trait>(
&'life0 self,
max_size: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive raw bytes from the guest
Source§fn receive_stream(
&self,
) -> Pin<Box<dyn Stream<Item = Result<StreamChunk>> + Send>>
fn receive_stream( &self, ) -> Pin<Box<dyn Stream<Item = Result<StreamChunk>> + Send>>
Receive a stream of chunks from the guest
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryStreamingChannel
impl !UnwindSafe for MemoryStreamingChannel
impl Freeze for MemoryStreamingChannel
impl Send for MemoryStreamingChannel
impl Sync for MemoryStreamingChannel
impl Unpin for MemoryStreamingChannel
impl UnsafeUnpin for MemoryStreamingChannel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more