pub struct ByteSink<W: Write, Factory: VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: VerdictRepresentation, OutputTime: OutputTimeRepresentation, Verdict: Into<Vec<u8>>> { /* private fields */ }Expand description
Generic VerdictSink that accepts verdicts as bytes and writes them to a Writer.
Implementations§
Source§impl<W: Write, Factory: VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: VerdictRepresentation, OutputTime: OutputTimeRepresentation, Verdict: Into<Vec<u8>>> ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W: Write, Factory: VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: VerdictRepresentation, OutputTime: OutputTimeRepresentation, Verdict: Into<Vec<u8>>> ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
Trait Implementations§
Source§impl<W: Debug + Write, Factory: Debug + VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: Debug + VerdictRepresentation, OutputTime: Debug + OutputTimeRepresentation, Verdict: Debug + Into<Vec<u8>>> Debug for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W: Debug + Write, Factory: Debug + VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: Debug + VerdictRepresentation, OutputTime: Debug + OutputTimeRepresentation, Verdict: Debug + Into<Vec<u8>>> Debug for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
Source§impl<W: Write, Factory: VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: VerdictRepresentation, OutputTime: OutputTimeRepresentation, Verdict: Into<Vec<u8>>> VerdictsSink<MonitorOutput, OutputTime> for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W: Write, Factory: VerdictFactory<MonitorOutput, OutputTime, Record = Verdict>, MonitorOutput: VerdictRepresentation, OutputTime: OutputTimeRepresentation, Verdict: Into<Vec<u8>>> VerdictsSink<MonitorOutput, OutputTime> for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
Source§type Error = Error
type Error = Error
Error Type of a VerdictsSink implementation
Source§type Factory = Factory
type Factory = Factory
Factory Type to convert the monitor output to the required representation
Source§type Return = ()
type Return = ()
Return Type of a VerdictsSink implementation
Source§fn sink(&mut self, verdict: Verdict) -> Result<Self::Return, Self::Error>
fn sink(&mut self, verdict: Verdict) -> Result<Self::Return, Self::Error>
Function to dispatch the converted verdict to the sink
Source§fn factory(&mut self) -> &mut Self::Factory
fn factory(&mut self) -> &mut Self::Factory
Function to return a reference to the Verdictfactory
Source§fn sink_verdicts(
&mut self,
verdicts: Verdicts<V, T>,
) -> Result<Vec<Self::Return>, VerdictSinkError<Self::Error, <Self::Factory as VerdictFactory<V, T>>::Error>>
fn sink_verdicts( &mut self, verdicts: Verdicts<V, T>, ) -> Result<Vec<Self::Return>, VerdictSinkError<Self::Error, <Self::Factory as VerdictFactory<V, T>>::Error>>
Defines how the verdicts of the monitor needs to be handled
Source§fn sink_verdict(
&mut self,
ts: <T as TimeRepresentation>::InnerTime,
verdict: V,
) -> Result<Self::Return, VerdictSinkError<Self::Error, <Self::Factory as VerdictFactory<V, T>>::Error>>
fn sink_verdict( &mut self, ts: <T as TimeRepresentation>::InnerTime, verdict: V, ) -> Result<Self::Return, VerdictSinkError<Self::Error, <Self::Factory as VerdictFactory<V, T>>::Error>>
Defines how one verdict of the monitor needs to be handled, timed and event-based
Auto Trait Implementations§
impl<W, Factory, MonitorOutput, OutputTime, Verdict> Freeze for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W, Factory, MonitorOutput, OutputTime, Verdict> RefUnwindSafe for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>where
Factory: RefUnwindSafe,
W: RefUnwindSafe,
MonitorOutput: RefUnwindSafe,
OutputTime: RefUnwindSafe,
impl<W, Factory, MonitorOutput, OutputTime, Verdict> Send for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W, Factory, MonitorOutput, OutputTime, Verdict> Sync for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W, Factory, MonitorOutput, OutputTime, Verdict> Unpin for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
impl<W, Factory, MonitorOutput, OutputTime, Verdict> UnwindSafe for ByteSink<W, Factory, MonitorOutput, OutputTime, Verdict>
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
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