Expand description
Defines Relevant
type to use in types that requires
custom destruction.
Crate supports 3 main mechnisms for error reporting:
- “panic” feature makes
Relevant
panic on drop - “log” feature uses
log
crate andRelevant
will emitlog::error!
on drop. - otherwise
Relevant
will print into stderr usingeprintln!
on drop.
“backtrace” feature will add backtrace to the error unless it is reported via panicking. “message” feature will add custom message (specified when value was created) to the error.
Structs§
- Values of this type can’t be automatically dropped. If struct or enum has field with type
Relevant
, it can’t be automatically dropped either. And so considered relevant too. User has to deconstruct such values and callRelevant::dispose
. If relevant field is private it means that user has to move value into some public method.