pub struct Offset { /* private fields */ }
Expand description
An absolute (non-negative) offset from the beginning of a core.
Implementations§
source§impl Offset
impl Offset
sourcepub fn new(value: i32, core_size: u32) -> Self
pub fn new(value: i32, core_size: u32) -> Self
Create a new Offset. The value will be adjusted to be within bounds of the core.
§Panics
If core_size
is invalid. Both 0 and u32::MAX
are disallowed.
Trait Implementations§
source§impl AddAssign<i32> for Offset
impl AddAssign<i32> for Offset
source§fn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
Performs the
+=
operation. Read moresource§impl AddAssign<u32> for Offset
impl AddAssign<u32> for Offset
source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+=
operation. Read moresource§impl AddAssign for Offset
impl AddAssign for Offset
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign<i32> for Offset
impl DivAssign<i32> for Offset
source§fn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
Performs the
/=
operation. Read moresource§impl DivAssign<u32> for Offset
impl DivAssign<u32> for Offset
source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/=
operation. Read moresource§impl DivAssign for Offset
impl DivAssign for Offset
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl MulAssign<i32> for Offset
impl MulAssign<i32> for Offset
source§fn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
Performs the
*=
operation. Read moresource§impl MulAssign<u32> for Offset
impl MulAssign<u32> for Offset
source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*=
operation. Read moresource§impl MulAssign for Offset
impl MulAssign for Offset
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl RemAssign<i32> for Offset
impl RemAssign<i32> for Offset
source§fn rem_assign(&mut self, rhs: i32)
fn rem_assign(&mut self, rhs: i32)
Performs the
%=
operation. Read moresource§impl RemAssign<u32> for Offset
impl RemAssign<u32> for Offset
source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%=
operation. Read moresource§impl RemAssign for Offset
impl RemAssign for Offset
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresource§impl SubAssign<i32> for Offset
impl SubAssign<i32> for Offset
source§fn sub_assign(&mut self, rhs: i32)
fn sub_assign(&mut self, rhs: i32)
Performs the
-=
operation. Read moresource§impl SubAssign<u32> for Offset
impl SubAssign<u32> for Offset
source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-=
operation. Read moresource§impl SubAssign for Offset
impl SubAssign for Offset
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for Offset
impl Eq for Offset
impl StructuralPartialEq for Offset
Auto Trait Implementations§
impl Freeze for Offset
impl RefUnwindSafe for Offset
impl Send for Offset
impl Sync for Offset
impl Unpin for Offset
impl UnwindSafe for Offset
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)