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§
Required Methods§
Sourcefn typed_code(&self, cause: Option<Cause<'_>>) -> Self::Code
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>
impl<C> dyn UniKindCode<Code = C>
Sourcepub fn downcast_ref<K: UniKindCode<Code = C>>(&self) -> Option<&K>
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".