virt::x86

Trait MsrErrorExt

Source
pub trait MsrErrorExt: Sized {
    // Required method
    fn or_else_if_unknown(self, f: impl FnOnce() -> Self) -> Self;
}
Expand description

Extension trait to chain MSR accesses together.

Required Methods§

Source

fn or_else_if_unknown(self, f: impl FnOnce() -> Self) -> Self

Calls f if self is Err(Msr::Unknown).

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<T> MsrErrorExt for Result<T, MsrError>

Source§

fn or_else_if_unknown(self, f: impl FnOnce() -> Self) -> Self

Implementors§