Trait timely::logging::ProgressEventTimestamp[][src]

pub trait ProgressEventTimestamp: Debug + Any {
    fn as_any(&self) -> &dyn Any;
fn type_name(&self) -> &'static str; }
Expand description

Encapsulates Any and Debug for dynamically typed timestamps in logs

Required methods

Upcasts this ProgressEventTimestamp to Any.

NOTE: This is required until is fixed

let ts = vec![(0usize, 0usize, (23u64, 10u64), -4i64), (0usize, 0usize, (23u64, 11u64), 1i64)];
let ts: &timely::logging::ProgressEventTimestampVec = &ts;
for (n, p, t, d) in ts.iter() {
    print!("{:?}, ", (n, p, t.as_any().downcast_ref::<(u64, u64)>(), d));

Returns the name of the concrete type of this object.


This is intended for diagnostic use. The exact contents and format of the string returned are not specified, other than being a best-effort description of the type. For example, amongst the strings that type_name::<Option<String>>() might return are "Option<String>" and "std::option::Option<std::string::String>".