pub struct RegSpan(/* private fields */);
Expand description
A RegSpan
of contiguous Reg
indices.
§Note
- Represents an amount of contiguous
Reg
indices. - For the sake of space efficiency the actual number of
Reg
of theRegSpan
is stored externally and provided inRegSpan::iter
when there is a need to iterate over theReg
of theRegSpan
.
The caller is responsible for providing the correct length. Due to Wasm validation guided bytecode construction we assert that the externally stored length is valid.
Implementations§
Source§impl RegSpan
impl RegSpan
Sourcepub fn iter_sized(self, len: usize) -> RegSpanIter ⓘ
pub fn iter_sized(self, len: usize) -> RegSpanIter ⓘ
Returns a RegSpanIter
yielding len
Reg
s.
Sourcepub fn iter(self, len: u16) -> RegSpanIter ⓘ
pub fn iter(self, len: u16) -> RegSpanIter ⓘ
Returns a RegSpanIter
yielding len
Reg
s.
Sourcepub fn has_overlapping_copies(results: Self, values: Self, len: u16) -> bool
pub fn has_overlapping_copies(results: Self, values: Self, len: u16) -> bool
Returns true
if copy_span results <- values
has overlapping copies.
§Examples
[ ]
: empty never overlaps[ 1 <- 0 ]
: single element never overlaps[ 0 <- 1, 1 <- 2, 2 <- 3 ]
: no overlap[ 1 <- 0, 2 <- 1 ]
: overlaps!
Trait Implementations§
Source§impl Ord for RegSpan
impl Ord for RegSpan
Source§impl PartialOrd for RegSpan
impl PartialOrd for RegSpan
impl Copy for RegSpan
impl Eq for RegSpan
impl StructuralPartialEq for RegSpan
Auto Trait Implementations§
impl Freeze for RegSpan
impl RefUnwindSafe for RegSpan
impl Send for RegSpan
impl Sync for RegSpan
impl Unpin for RegSpan
impl UnwindSafe for RegSpan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.