Skip to main content

PayloadDefaultLoggingPolicy

Trait PayloadDefaultLoggingPolicy 

Source
pub trait PayloadDefaultLoggingPolicy {
    // Provided method
    fn payload_should_log(&self) -> bool { ... }
}
Expand description

Default arm of the autoref-specialization pattern used by the unified-log encoder.

Blanket-impl’d for every type, so any payload that doesn’t define its own inherent payload_should_log method inherits this default-true implementation. Types like CuHandle (and composite payloads wrapping one) provide an inherent method with the same name, which wins method resolution because inherent methods are tried before trait methods at the same candidate self-type.

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§