pub struct AsyncWriter<'a, S: AsyncSink> { /* private fields */ }Available on crate feature
async only.Expand description
Writes the messages of one file to an async sink, as Writer does to a sink.
write_async hands one to the source, and AsyncOnePass::writer gives one, so a
function taking a &mut AsyncWriter serves both.
A call returns once its bytes are staged and each stage they filled has gone to the sink, so
the sink’s error can surface as Error::Sink on a later call; write_async and
AsyncOnePass::finish return it.
Implementations§
Source§impl<S: AsyncSink> AsyncWriter<'_, S>
impl<S: AsyncSink> AsyncWriter<'_, S>
Sourcepub async fn session(
&mut self,
t: Timestamp,
sport: Sport,
sub_sport: SubSport,
) -> Result<(), Error>
pub async fn session( &mut self, t: Timestamp, sport: Sport, sub_sport: SubSport, ) -> Result<(), Error>
Sourcepub async fn record_with(
&mut self,
record: &Record,
extras: &[Extra<'_>],
) -> Result<(), Error>
pub async fn record_with( &mut self, record: &Record, extras: &[Extra<'_>], ) -> Result<(), Error>
Sourcepub async fn declare<T: DevType + ?Sized, K: Kind>(
&mut self,
description: &FieldDescription<'_, T, K>,
) -> Result<DevField<T, K>, Error>
pub async fn declare<T: DevType + ?Sized, K: Kind>( &mut self, description: &FieldDescription<'_, T, K>, ) -> Result<DevField<T, K>, Error>
Sourcepub async fn developer_value<T: DevType + ?Sized, K: Summary>(
&mut self,
field: &DevField<T, K>,
value: T::Value<'_>,
) -> Result<(), Error>
pub async fn developer_value<T: DevType + ?Sized, K: Summary>( &mut self, field: &DevField<T, K>, value: T::Value<'_>, ) -> Result<(), Error>
Sourcepub async fn raw_message(
&mut self,
global: u16,
fields: &[RawField<'_>],
) -> Result<(), Error>
pub async fn raw_message( &mut self, global: u16, fields: &[RawField<'_>], ) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> !UnwindSafe for AsyncWriter<'a, S>
impl<'a, S> Forget for AsyncWriter<'a, S>
impl<'a, S> Freeze for AsyncWriter<'a, S>
impl<'a, S> Move for AsyncWriter<'a, S>
impl<'a, S> RefUnwindSafe for AsyncWriter<'a, S>
impl<'a, S> Send for AsyncWriter<'a, S>
impl<'a, S> Sync for AsyncWriter<'a, S>
impl<'a, S> Unpin for AsyncWriter<'a, S>
impl<'a, S> UnsafeUnpin for AsyncWriter<'a, S>where
&'a mut State: UnsafeUnpin,
&'a mut Staged<S>: UnsafeUnpin,
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