#[non_exhaustive]pub enum ElapsedAnchor {
Absolute,
SincePreviousLine,
SinceProgramStart,
}Expand description
Elapsed-time anchor selector. Absolute is the default; the other
variants correspond to the CLI -i / -s flags.
§Example
use rusty_ts::{ElapsedAnchor, TimestamperBuilder};
// Render elapsed time since program start (matches CLI `-s`).
let ts = TimestamperBuilder::new()
.elapsed(ElapsedAnchor::SinceProgramStart)
.build()
.unwrap();Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Absolute
Absolute wall-clock time (no elapsed anchor). Default.
SincePreviousLine
Elapsed since the previous input line (-i).
SinceProgramStart
Elapsed since program start (-s).
Trait Implementations§
Source§impl Clone for ElapsedAnchor
impl Clone for ElapsedAnchor
Source§fn clone(&self) -> ElapsedAnchor
fn clone(&self) -> ElapsedAnchor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElapsedAnchor
impl Debug for ElapsedAnchor
Source§impl Default for ElapsedAnchor
impl Default for ElapsedAnchor
Source§fn default() -> ElapsedAnchor
fn default() -> ElapsedAnchor
Returns the “default value” for a type. Read more
impl Copy for ElapsedAnchor
Auto Trait Implementations§
impl Freeze for ElapsedAnchor
impl RefUnwindSafe for ElapsedAnchor
impl Send for ElapsedAnchor
impl Sync for ElapsedAnchor
impl Unpin for ElapsedAnchor
impl UnsafeUnpin for ElapsedAnchor
impl UnwindSafe for ElapsedAnchor
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