pub struct TestRecord<'a> {
pub severity: u8,
pub timestamp: Instant<BootTimeline>,
pub file: Option<&'a str>,
pub line: Option<u32>,
pub record_arguments: Vec<Argument<'a>>,
}
Expand description
Arguments to create a record for testing purposes.
Fields§
§severity: u8
Severity of the log
timestamp: Instant<BootTimeline>
Timestamp of the test record.
file: Option<&'a str>
File that emitted the log.
line: Option<u32>
Line in the file that emitted the log.
record_arguments: Vec<Argument<'a>>
Additional record arguments.
Implementations§
Source§impl TestRecord<'_>
impl TestRecord<'_>
Trait Implementations§
Source§impl RecordEvent for TestRecord<'_>
impl RecordEvent for TestRecord<'_>
Source§fn raw_severity(&self) -> u8
fn raw_severity(&self) -> u8
Returns the record severity.
Source§fn line(&self) -> Option<u32>
fn line(&self) -> Option<u32>
Returns the number of the line in the file where the record was emitted.
Source§fn timestamp(&self) -> Instant<BootTimeline>
fn timestamp(&self) -> Instant<BootTimeline>
Returns the timestamp associated to this record.
Source§fn write_arguments<B>(
self,
writer: &mut Encoder<B>,
) -> Result<(), EncodingError>where
B: MutableBuffer,
fn write_arguments<B>(
self,
writer: &mut Encoder<B>,
) -> Result<(), EncodingError>where
B: MutableBuffer,
Consumes this type and writes all the arguments.
Auto Trait Implementations§
impl<'a> Freeze for TestRecord<'a>
impl<'a> RefUnwindSafe for TestRecord<'a>
impl<'a> Send for TestRecord<'a>
impl<'a> Sync for TestRecord<'a>
impl<'a> Unpin for TestRecord<'a>
impl<'a> UnwindSafe for TestRecord<'a>
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,
§impl<T> IntoAny for T
impl<T> IntoAny for T
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