pub struct RegisterRange {
pub start: RegisterId,
pub end: RegisterId,
}Expand description
Represents a range of registers in a bank.
A range is at least 1 register long (if start == end).
Fields§
§start: RegisterIdThe first register in the range.
end: RegisterIdThe last register in the range.
Implementations§
Source§impl RegisterRange
impl RegisterRange
Sourcepub fn new(start: RegisterId, end: RegisterId) -> Self
pub fn new(start: RegisterId, end: RegisterId) -> Self
Creates a range from a start and an end RegisterIds.
May panic if end < start.
Sourcepub fn to_usize_range(&self) -> RangeInclusive<usize>
pub fn to_usize_range(&self) -> RangeInclusive<usize>
Returns a range usable to extract a slice notably.
Trait Implementations§
Source§impl Clone for RegisterRange
impl Clone for RegisterRange
Source§fn clone(&self) -> RegisterRange
fn clone(&self) -> RegisterRange
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 RegisterRange
impl Debug for RegisterRange
Source§impl Display for RegisterRange
impl Display for RegisterRange
Source§impl Ord for RegisterRange
impl Ord for RegisterRange
Source§fn cmp(&self, other: &RegisterRange) -> Ordering
fn cmp(&self, other: &RegisterRange) -> 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 RegisterRange
impl PartialEq for RegisterRange
Source§impl PartialOrd for RegisterRange
impl PartialOrd for RegisterRange
impl Copy for RegisterRange
impl Eq for RegisterRange
impl StructuralPartialEq for RegisterRange
Auto Trait Implementations§
impl Freeze for RegisterRange
impl RefUnwindSafe for RegisterRange
impl Send for RegisterRange
impl Sync for RegisterRange
impl Unpin for RegisterRange
impl UnwindSafe for RegisterRange
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