Struct sea_streamer_file::FileProducer
source · pub struct FileProducer { /* private fields */ }Trait Implementations§
source§impl Clone for FileProducer
impl Clone for FileProducer
source§fn clone(&self) -> FileProducer
fn clone(&self) -> FileProducer
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 moresource§impl Debug for FileProducer
impl Debug for FileProducer
source§impl Drop for FileProducer
impl Drop for FileProducer
source§impl Producer for FileProducer
impl Producer for FileProducer
type Error = FileErr
type SendFuture = SendFuture
source§fn send_to<S: Buffer>(
&self,
stream_key: &StreamKey,
buffer: S
) -> FileResult<Self::SendFuture>
fn send_to<S: Buffer>( &self, stream_key: &StreamKey, buffer: S ) -> FileResult<Self::SendFuture>
Send a message to a particular stream. This function is non-blocking.
You don’t have to await the future if you are not interested in the Receipt.
source§fn end<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = FileResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
fn end<'async_trait>( self ) -> Pin<Box<dyn Future<Output = FileResult<()>> + Send + 'async_trait>>where Self: 'async_trait,
End this producer, only after flushing all it’s pending messages.
source§fn flush<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = FileResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = FileResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Flush all pending messages.
source§fn anchor(&mut self, stream: StreamKey) -> FileResult<()>
fn anchor(&mut self, stream: StreamKey) -> FileResult<()>
Lock this producer to a particular stream. This function can only be called once.
Subsequent calls should return
StreamErr::AlreadyAnchored error.source§fn anchored(&self) -> FileResult<&StreamKey>
fn anchored(&self) -> FileResult<&StreamKey>
If the producer is already anchored, return a reference to the StreamKey.
If the producer is not anchored, this will return
StreamErr::NotAnchored error.Auto Trait Implementations§
impl RefUnwindSafe for FileProducer
impl Send for FileProducer
impl Sync for FileProducer
impl Unpin for FileProducer
impl UnwindSafe for FileProducer
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