pub trait IoKnownSize: Io {
const MIN_SIZE: usize;
// Provided method
fn io_addr_assert<U>(&self, offset: usize) -> usize { ... }
}Expand description
Trait for types with a known size at compile time.
This trait is implemented by I/O backends that have a compile-time known size, enabling the use of infallible I/O accessors with compile-time bounds checking.
Types implementing this trait can use the infallible methods in Io trait
(e.g., read8, write32), which require Self: IoKnownSize bound.
Required Associated Constants§
Provided Methods§
Sourcefn io_addr_assert<U>(&self, offset: usize) -> usize
fn io_addr_assert<U>(&self, offset: usize) -> usize
Returns the absolute I/O address for a given offset,
performing compile-time bound checks.
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.