pub trait Steal {
// Required method
unsafe fn steal() -> Self;
}
Required Methods§
Sourceunsafe fn steal() -> Self
unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally the HAL may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
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.