Trait ModeType

Source
pub trait ModeType:
    Display
    + Debug
    + Clone
    + PartialEq {
    // Required methods
    fn mode(target: &str, modes: &[Mode<Self>]) -> Command;
    fn takes_arg(&self) -> bool;
    fn from_char(c: char) -> Self;
}
Expand description

A marker trait for different kinds of Modes.

Required Methods§

Source

fn mode(target: &str, modes: &[Mode<Self>]) -> Command

Creates a command of this kind.

Source

fn takes_arg(&self) -> bool

Returns true if this mode takes an argument, and false otherwise.

Source

fn from_char(c: char) -> Self

Creates a Mode from a given char.

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.

Implementors§