Skip to main content

UniKindCode

Trait UniKindCode 

Source
pub trait UniKindCode: UniKind {
    type Code;

    // Required method
    fn typed_code(&self, cause: Option<Cause<'_>>) -> Self::Code;
}
Expand description

A UniKind that has a typed code.

Required Associated Types§

Source

type Code

The type of the code.

Required Methods§

Source

fn typed_code(&self, cause: Option<Cause<'_>>) -> Self::Code

Returns the typed code for this specific kind.

Implementations§

Source§

impl<C> dyn UniKindCode<Code = C>

Source

pub fn downcast_ref<K: UniKindCode<Code = C>>(&self) -> Option<&K>

Attempts to downcast a UniKindCode to a specific concrete type.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§