pub trait StepExt:
Clone
+ Copy
+ Default
+ PartialEq
+ Eq
+ Hash
+ Debug
+ Unpin {
// Required methods
fn next(&self) -> Option<Self>;
fn as_number(&self) -> usize;
fn label(&self) -> &'static str;
fn get_list() -> Vec<Self>;
fn get_preview() -> Self;
// Provided method
fn is_preview(&self) -> bool { ... }
}
Expand description
This extension trait makes it possible to keep the Step functionality generic and at a higher level than the module itself
Required Methods§
Sourcefn get_preview() -> Self
fn get_preview() -> Self
Get the step which is synonymous with “preview” TODO: this could probably be derived as a combo of get_list() and next() (i.e. the first step to return None)
Provided Methods§
Sourcefn is_preview(&self) -> bool
fn is_preview(&self) -> bool
Auto-implemented, check whether current step is “preview”
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 StepExt for ()
impl StepExt for ()
impl StepExt for empty steps this is a special case and should only be used where the module genuinely ignores the step one example is the Legacy module