Command

Trait Command 

Source
pub trait Command<'a> {
    type Response;

    const COMMAND_STR: &'static str;

    // Required method
    fn parse_response(
        response: &'a str,
    ) -> Result<Self::Response, GencmdCmdError>;
}

Required Associated Constants§

Source

const COMMAND_STR: &'static str

Required Associated Types§

Required Methods§

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§

Source§

impl<'a> Command<'a> for CmdCommands

Source§

const COMMAND_STR: &'static str = "commands"

Source§

type Response = Vec<&'a str>

Source§

impl<'a> Command<'a> for CmdGetThrottled

Source§

const COMMAND_STR: &'static str = "get_throttled"

Source§

type Response = CpuThrottled

Source§

impl<'a> Command<'a> for CmdMeasureClockArm

Source§

const COMMAND_STR: &'static str = "measure_clock arm"

Source§

type Response = u64

Source§

impl<'a> Command<'a> for CmdMeasureTemp

Source§

const COMMAND_STR: &'static str = "measure_temp"

Source§

type Response = f32