pub unsafe trait ReadBuffer {
// Required method
unsafe fn read_buffer(&self) -> (*const u8, usize);
}Expand description
Trait for buffers that can be given to DMA for reading.
§Safety
Once the read_buffer method has been called, it is unsafe to call any
&mut self methods on this object as long as the returned value is in use
(by DMA).
Required Methods§
Sourceunsafe fn read_buffer(&self) -> (*const u8, usize)
unsafe fn read_buffer(&self) -> (*const u8, usize)
Provide a buffer usable for DMA reads.
The return value is:
- pointer to the start of the buffer
- buffer size in bytes
§Safety
Once this method has been called, it is unsafe to call any &mut self
methods on this object as long as the returned value is in use (by DMA).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<W, const S: usize> ReadBuffer for &[W; S]where
W: Word,
Available on crate feature unstable only.
impl<W, const S: usize> ReadBuffer for &[W; S]where
W: Word,
Available on crate feature
unstable only.Source§impl<W, const S: usize> ReadBuffer for &mut [W; S]where
W: Word,
Available on crate feature unstable only.
impl<W, const S: usize> ReadBuffer for &mut [W; S]where
W: Word,
Available on crate feature
unstable only.Source§impl<W, const S: usize> ReadBuffer for [W; S]where
W: Word,
Available on crate feature unstable only.
impl<W, const S: usize> ReadBuffer for [W; S]where
W: Word,
Available on crate feature
unstable only.Source§impl<W> ReadBuffer for &[W]where
W: Word,
Available on crate feature unstable only.
impl<W> ReadBuffer for &[W]where
W: Word,
Available on crate feature
unstable only.Source§impl<W> ReadBuffer for &mut [W]where
W: Word,
Available on crate feature unstable only.
impl<W> ReadBuffer for &mut [W]where
W: Word,
Available on crate feature
unstable only.