Struct sea_streamer_file::FileProducer
source · pub struct FileProducer { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Clone for FileProducer
impl Clone for FileProducer
source§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§async fn end(self) -> FileResult<()>
async fn end(self) -> FileResult<()>
End this producer, only after flushing all it’s pending messages.
source§async fn flush(&mut self) -> FileResult<()>
async fn flush(&mut self) -> FileResult<()>
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 Freeze for FileProducer
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