pub struct FakeLogSink { /* private fields */ }
Expand description
FakeLogSink serves LogSink connections and forward any messages logged to it.
Implementations§
Source§impl FakeLogSink
impl FakeLogSink
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new FakeLogSink and receiver that will have messages delivered to it.
Sourcepub async fn read_message(&mut self) -> String
pub async fn read_message(&mut self) -> String
Returns a message sent to the sink.
Sourcepub fn serve(&self, server_end: ServerEnd<LogSinkMarker>)
pub fn serve(&self, server_end: ServerEnd<LogSinkMarker>)
Handles the server end of the LogSink connection.
Sourcepub fn set_min_severity(&self, severity: Severity)
pub fn set_min_severity(&self, severity: Severity)
Sets the minimum severity and notifies all listeners.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FakeLogSink
impl !RefUnwindSafe for FakeLogSink
impl Send for FakeLogSink
impl Sync for FakeLogSink
impl Unpin for FakeLogSink
impl !UnwindSafe for FakeLogSink
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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