Trait DecrustResultExtConvenience

Source
pub trait DecrustResultExtConvenience<T, EOrig> {
    // Required method
    fn decrust_context<S: Into<String>>(
        self,
        message: S,
    ) -> Result<T, DecrustError>;
}
Expand description

Convenience trait for backward compatibility with generic string types

Note: This trait is NOT object-safe due to the use of impl Into<String>. Use DecrustResultExt for object-safe operations.

Required Methods§

Source

fn decrust_context<S: Into<String>>(self, message: S) -> Result<T, DecrustError>

Convenience method for adding context with any string-like type

Warning: This method makes the trait NOT object-safe.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, E> DecrustResultExtConvenience<T, E> for Result<T, E>
where E: Into<DecrustError>,

Source§

fn decrust_context<S: Into<String>>(self, message: S) -> Result<T, DecrustError>

Implementors§