pub trait MmioSplit: Mmio + Sized {
// Required method
fn try_split_off(&mut self, mid: usize) -> Result<Self, MmioError>;
// Provided method
fn split_off(&mut self, mid: usize) -> Self { ... }
}
Expand description
An MMIO region from which ownership of disjoint sub-regions can be split off.
Required Methods§
Sourcefn try_split_off(&mut self, mid: usize) -> Result<Self, MmioError>
fn try_split_off(&mut self, mid: usize) -> Result<Self, MmioError>
Splits this Mmio region into two at the given mid-point and returns the left-hand-side. This MMIO region’s bounds are updated to contain only the right-hand-side.
§Errors
- MmioError::OutOfRange: if
mid > self.len()
.
Provided 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.