IpmiCommand

Trait IpmiCommand 

Source
pub trait IpmiCommand: Into<Message> {
    type Output;
    type Error;

    // Required method
    fn parse_success_response(data: &[u8]) -> Result<Self::Output, Self::Error>;

    // Provided methods
    fn handle_completion_code(
        completion_code: CompletionErrorCode,
        data: &[u8],
    ) -> Option<Self::Error> { ... }
    fn target(&self) -> Option<(Address, Channel)> { ... }
}
Expand description

An IPMI command that can be turned into a request, and whose response can be parsed from response data.

Required Associated Types§

Source

type Output

The output of this command, i.e. the expected response type.

Source

type Error

The type of error that can occur while parsing the response for this command.

Required Methods§

Source

fn parse_success_response(data: &[u8]) -> Result<Self::Output, Self::Error>

Try to parse the expected response for this command from the provided data, assuming a successful completion code.

Provided Methods§

Source

fn handle_completion_code( completion_code: CompletionErrorCode, data: &[u8], ) -> Option<Self::Error>

Handle the provided completion code completion_code and optionally provide a special error in case of failure.

Non-success completion codes for which this function returns None should be handled by the caller of parse_success_response.

The default implementation of this function performs no special handling and returns None.

Source

fn target(&self) -> Option<(Address, Channel)>

Get the intended target Address and Channel for this commmand.

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 IpmiCommand for ActivateSession

Source§

impl IpmiCommand for GetChannelAuthenticationCapabilities

Source§

impl IpmiCommand for GetChannelCipherSuites

Source§

impl IpmiCommand for GetSessionChallenge

Source§

impl IpmiCommand for GetDeviceId

Source§

impl IpmiCommand for GetSensorReading

Source§

impl IpmiCommand for GetDeviceSdr

Source§

impl IpmiCommand for GetDeviceSdrInfo<SdrCount>

Source§

impl IpmiCommand for GetDeviceSdrInfo<SensorCount>

Source§

impl IpmiCommand for GetRepositoryInfo

Source§

impl IpmiCommand for ipmi_rs_core::storage::sdr::SdrGetAllocInfo

Source§

impl IpmiCommand for ClearSel

Source§

impl IpmiCommand for GetEntry

Source§

impl IpmiCommand for GetInfo

Source§

impl IpmiCommand for ReserveSel

Source§

impl IpmiCommand for ipmi_rs_core::storage::sel::SelGetAllocInfo