pub struct Region {
pub start: usize,
pub end: usize,
}Expand description
A half-open byte window [start, end) inside the arena that a value
is required to be self-contained in. start <= end is enforced by
Region::new; every offset the verifier follows must satisfy
start <= off and the introduced span must end at or before end.
Fields§
§start: usizeFirst byte of the region (inclusive), as an absolute index into the verified byte slice.
end: usizeOne past the last byte of the region (exclusive).
Implementations§
Source§impl Region
impl Region
Sourcepub fn new(start: usize, end: usize) -> Result<Self, VerifyError>
pub fn new(start: usize, end: usize) -> Result<Self, VerifyError>
Build a region, returning VerifyError::DegenerateRegion when
start > end (a caller bug — the arena layout never produces an
inverted window).
Trait Implementations§
impl Copy for Region
impl Eq for Region
impl StructuralPartialEq for Region
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnsafeUnpin for Region
impl UnwindSafe for Region
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more