pub struct StreamModeOverride { /* private fields */ }Expand description
Sets the mode of one client’s stream on its device while it lives, restored on drop: what a measurement opens, so its launches run whatever the process mode discards.
Keyed on the device and the stream the client’s launches go out on — a client bound to a stream of its own does not follow the thread’s — so it holds wherever those launches are issued from, a task resumed on another thread included. Overrides of one stream nest, the newest deciding, and may drop in any order.
Only the client’s stream follows it: a launch another client issues on another stream — a candidate holding a client bound elsewhere — keeps its own stream’s mode, and under a process mode that discards is discarded, so a measurement launches through the client it switched.
Every launch on that stream of that device follows it, whichever thread
issues it. Where threads share a stream — StreamPolicy::Single, or a
build without per-thread streams — a launch another thread issues while a
measurement runs executes too, rather than being discarded.
Implementations§
Source§impl StreamModeOverride
impl StreamModeOverride
Sourcepub fn new(mode: StreamMode, client: &Client) -> StreamModeOverride
pub fn new(mode: StreamMode, client: &Client) -> StreamModeOverride
Put client’s stream on its device in mode until the guard drops.
Trait Implementations§
Source§impl Debug for StreamModeOverride
impl Debug for StreamModeOverride
Source§impl Drop for StreamModeOverride
impl Drop for StreamModeOverride
Auto Trait Implementations§
impl Freeze for StreamModeOverride
impl RefUnwindSafe for StreamModeOverride
impl Send for StreamModeOverride
impl Sync for StreamModeOverride
impl Unpin for StreamModeOverride
impl UnsafeUnpin for StreamModeOverride
impl UnwindSafe for StreamModeOverride
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§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> ⓘ
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> ⓘ
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