Struct dfir_rs::util::simulation::TransducerBuilderContext
source · pub struct TransducerBuilderContext<'context> { /* private fields */ }
Expand description
Used in conjunction with the HostBuilder
to construct a host in the simulation.
Implementations§
source§impl TransducerBuilderContext<'_>
impl TransducerBuilderContext<'_>
sourcepub fn new_inbox<T: 'static>(
&mut self,
interface: String,
) -> UnboundedReceiverStream<(T, Address)>
pub fn new_inbox<T: 'static>( &mut self, interface: String, ) -> UnboundedReceiverStream<(T, Address)>
Create a new inbox on the host with the given interface name. Returns a stream that can be read by the transducer using the source_stream dfir operator.
sourcepub fn new_outbox<T: 'static>(
&mut self,
interface: String,
) -> impl Sink<(T, Address), Error = Infallible>
pub fn new_outbox<T: 'static>( &mut self, interface: String, ) -> impl Sink<(T, Address), Error = Infallible>
Creates a new outbox on the host with the given interface name. Returns a sink that can be written to by the transducer using the dest_sink dfir operator.
Auto Trait Implementations§
impl<'context> Freeze for TransducerBuilderContext<'context>
impl<'context> !RefUnwindSafe for TransducerBuilderContext<'context>
impl<'context> !Send for TransducerBuilderContext<'context>
impl<'context> !Sync for TransducerBuilderContext<'context>
impl<'context> Unpin for TransducerBuilderContext<'context>
impl<'context> !UnwindSafe for TransducerBuilderContext<'context>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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