pub struct AlignedAddr { /* private fields */ }
Expand description
A u64
aligned flash address.
An argument of Flash::program_bytes
.
§Example
Create an aligned flash address by converting from usize
.
use stm32wlxx_hal::flash::AlignedAddr;
let addr: AlignedAddr = AlignedAddr::try_from(0x0803_F800_usize)?;
Implementations§
Source§impl AlignedAddr
impl AlignedAddr
Sourcepub const unsafe fn new_unchecked(addr: usize) -> Self
pub const unsafe fn new_unchecked(addr: usize) -> Self
Create a page address from an index without checking bounds.
§Safety
- The
addr
argument must be a multiple of 8. - The
addr
argument must be a valid flash address, within the range returned byflash_range
.
§Example
use stm32wlxx_hal::flash::Page;
let page0 = unsafe { Page::from_index_unchecked(0) };
Trait Implementations§
Source§impl Clone for AlignedAddr
impl Clone for AlignedAddr
Source§fn clone(&self) -> AlignedAddr
fn clone(&self) -> AlignedAddr
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AlignedAddr
impl Debug for AlignedAddr
Source§impl From<AlignedAddr> for u32
impl From<AlignedAddr> for u32
Source§fn from(addr: AlignedAddr) -> Self
fn from(addr: AlignedAddr) -> Self
Converts to this type from the input type.
Source§impl From<AlignedAddr> for usize
impl From<AlignedAddr> for usize
Source§fn from(addr: AlignedAddr) -> Self
fn from(addr: AlignedAddr) -> Self
Converts to this type from the input type.
Source§impl From<Page> for AlignedAddr
impl From<Page> for AlignedAddr
Source§impl Ord for AlignedAddr
impl Ord for AlignedAddr
Source§fn cmp(&self, other: &AlignedAddr) -> Ordering
fn cmp(&self, other: &AlignedAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AlignedAddr
impl PartialEq for AlignedAddr
Source§impl PartialOrd for AlignedAddr
impl PartialOrd for AlignedAddr
Source§impl TryFrom<u32> for AlignedAddr
impl TryFrom<u32> for AlignedAddr
Source§impl TryFrom<usize> for AlignedAddr
impl TryFrom<usize> for AlignedAddr
impl Copy for AlignedAddr
impl Eq for AlignedAddr
impl StructuralPartialEq for AlignedAddr
Auto Trait Implementations§
impl Freeze for AlignedAddr
impl RefUnwindSafe for AlignedAddr
impl Send for AlignedAddr
impl Sync for AlignedAddr
impl Unpin for AlignedAddr
impl UnwindSafe for AlignedAddr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more