pub enum Index {
Position(isize),
Bit(isize),
}Variants§
Implementations§
Source§impl Index
impl Index
pub fn castsize(x: usize) -> Result<isize, IndexError>
pub fn uncastsize(x: isize) -> Result<usize, IndexError>
pub fn position_to_bit(x: isize) -> Result<isize, IndexError>
pub fn bit_to_position(x: isize) -> isize
pub fn saturating_unsigned(x: isize) -> usize
pub fn cast(&self) -> Result<Index, IndexError>
pub fn cast_to_position(&self) -> Index
pub fn bit_position_excess(&self) -> isize
pub fn cast_to_bit(&self) -> Result<Index, IndexError>
pub fn saturating_nonnegative(&self) -> Index
pub fn value(&self) -> isize
pub fn unsigned_value(&self) -> usize
pub fn bit_value(&self) -> Result<isize, IndexError>
pub fn neg(self) -> Result<Index, IndexError>
Trait Implementations§
Source§impl AddAssign<&Index> for Index
impl AddAssign<&Index> for Index
Source§fn add_assign(&mut self, other: &Index)
fn add_assign(&mut self, other: &Index)
Performs the
+= operation. Read moreSource§impl AddAssign<&isize> for Index
impl AddAssign<&isize> for Index
Source§fn add_assign(&mut self, other: &isize)
fn add_assign(&mut self, other: &isize)
Performs the
+= operation. Read moreSource§impl AddAssign<&usize> for Index
impl AddAssign<&usize> for Index
Source§fn add_assign(&mut self, other: &usize)
fn add_assign(&mut self, other: &usize)
Performs the
+= operation. Read moreSource§impl AddAssign<isize> for Index
impl AddAssign<isize> for Index
Source§fn add_assign(&mut self, other: isize)
fn add_assign(&mut self, other: isize)
Performs the
+= operation. Read moreSource§impl AddAssign<usize> for Index
impl AddAssign<usize> for Index
Source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the
+= operation. Read moreSource§impl AddAssign for Index
impl AddAssign for Index
Source§fn add_assign(&mut self, other: Index)
fn add_assign(&mut self, other: Index)
Performs the
+= operation. Read moreSource§impl MulAssign<&Index> for Index
impl MulAssign<&Index> for Index
Source§fn mul_assign(&mut self, other: &Index)
fn mul_assign(&mut self, other: &Index)
Performs the
*= operation. Read moreSource§impl MulAssign<&isize> for Index
impl MulAssign<&isize> for Index
Source§fn mul_assign(&mut self, other: &isize)
fn mul_assign(&mut self, other: &isize)
Performs the
*= operation. Read moreSource§impl MulAssign<&usize> for Index
impl MulAssign<&usize> for Index
Source§fn mul_assign(&mut self, other: &usize)
fn mul_assign(&mut self, other: &usize)
Performs the
*= operation. Read moreSource§impl MulAssign<isize> for Index
impl MulAssign<isize> for Index
Source§fn mul_assign(&mut self, other: isize)
fn mul_assign(&mut self, other: isize)
Performs the
*= operation. Read moreSource§impl MulAssign<usize> for Index
impl MulAssign<usize> for Index
Source§fn mul_assign(&mut self, other: usize)
fn mul_assign(&mut self, other: usize)
Performs the
*= operation. Read moreSource§impl MulAssign for Index
impl MulAssign for Index
Source§fn mul_assign(&mut self, other: Index)
fn mul_assign(&mut self, other: Index)
Performs the
*= operation. Read moreSource§impl Ord for Index
impl Ord for Index
1.21.0 (const: unstable) · 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 PartialOrd<isize> for Index
impl PartialOrd<isize> for Index
Source§impl PartialOrd<usize> for Index
impl PartialOrd<usize> for Index
Source§impl PartialOrd for Index
impl PartialOrd for Index
Source§impl SubAssign<&Index> for Index
impl SubAssign<&Index> for Index
Source§fn sub_assign(&mut self, other: &Index)
fn sub_assign(&mut self, other: &Index)
Performs the
-= operation. Read moreSource§impl SubAssign<&isize> for Index
impl SubAssign<&isize> for Index
Source§fn sub_assign(&mut self, other: &isize)
fn sub_assign(&mut self, other: &isize)
Performs the
-= operation. Read moreSource§impl SubAssign<&usize> for Index
impl SubAssign<&usize> for Index
Source§fn sub_assign(&mut self, other: &usize)
fn sub_assign(&mut self, other: &usize)
Performs the
-= operation. Read moreSource§impl SubAssign<isize> for Index
impl SubAssign<isize> for Index
Source§fn sub_assign(&mut self, other: isize)
fn sub_assign(&mut self, other: isize)
Performs the
-= operation. Read moreSource§impl SubAssign<usize> for Index
impl SubAssign<usize> for Index
Source§fn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
Performs the
-= operation. Read moreSource§impl SubAssign for Index
impl SubAssign for Index
Source§fn sub_assign(&mut self, other: Index)
fn sub_assign(&mut self, other: Index)
Performs the
-= operation. Read moreimpl Copy for Index
impl Eq for Index
Auto Trait Implementations§
impl Freeze for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnsafeUnpin for Index
impl UnwindSafe for Index
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