pub trait TryExtract: Sized + Extract {
// Required method
fn can_extract(event: &Event) -> bool;
// Provided method
fn try_extract(event: &Event) -> Option<Self> { ... }
}
Expand description
Attempts to extract information from a combat event.
Required Methods§
Sourcefn can_extract(event: &Event) -> bool
fn can_extract(event: &Event) -> bool
Checks whether Self
can be extracted from the event.
Provided Methods§
Sourcefn try_extract(event: &Event) -> Option<Self>
fn try_extract(event: &Event) -> Option<Self>
Attempts to extract Self
from the combat event.
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.