pub struct SinkHandle { /* private fields */ }Expand description
A running stream. Dropping it stops the stream. It is not Send, because some platform streams are not.
Implementations§
Source§impl SinkHandle
impl SinkHandle
Sourcepub fn new(
config: SinkConfig,
description: impl Into<String>,
stats: SinkStats,
guard: Box<dyn Any>,
) -> Self
pub fn new( config: SinkConfig, description: impl Into<String>, stats: SinkStats, guard: Box<dyn Any>, ) -> Self
For backends: wraps a running stream. guard stops the stream when dropped.
Sourcepub fn config(&self) -> SinkConfig
pub fn config(&self) -> SinkConfig
The format the stream actually runs at.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Which device and backend this is, for logs and a settings screen.
pub fn stats(&self) -> &SinkStats
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SinkHandle
impl !Send for SinkHandle
impl !Sync for SinkHandle
impl !UnwindSafe for SinkHandle
impl Forget for SinkHandle
impl Freeze for SinkHandle
impl Move for SinkHandle
impl Unpin for SinkHandle
impl UnsafeUnpin for SinkHandlewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
*const dyn Any is !null: UnsafeUnpin,
PhantomData<dyn Any>: 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