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§
Required Methods§
Provided Methods§
Sourcefn handle_completion_code(
completion_code: CompletionErrorCode,
data: &[u8],
) -> Option<Self::Error>
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.
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.