[−][src]Struct codespan::ByteIndex
A byte position in a source file.
Implementations
impl ByteIndex
[src]
pub const fn to_usize(self) -> usize
[src]
Convert the position into a usize
, for use in array indexing
Trait Implementations
impl Add<ByteOffset> for ByteIndex
[src]
type Output = ByteIndex
The resulting type after applying the +
operator.
fn add(self, rhs: ByteOffset) -> ByteIndex
[src]
impl AddAssign<ByteOffset> for ByteIndex
[src]
fn add_assign(&mut self, rhs: ByteOffset)
[src]
impl Clone for ByteIndex
[src]
impl Copy for ByteIndex
[src]
impl Debug for ByteIndex
[src]
impl Default for ByteIndex
[src]
impl Display for ByteIndex
[src]
impl Eq for ByteIndex
[src]
impl From<ByteIndex> for RawIndex
[src]
impl From<ByteIndex> for usize
[src]
impl From<u32> for ByteIndex
[src]
impl Hash for ByteIndex
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Index for ByteIndex
[src]
type Offset = ByteOffset
impl Ord for ByteIndex
[src]
fn cmp(&self, other: &ByteIndex) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ByteIndex> for ByteIndex
[src]
impl PartialOrd<ByteIndex> for ByteIndex
[src]
fn partial_cmp(&self, other: &ByteIndex) -> Option<Ordering>
[src]
fn lt(&self, other: &ByteIndex) -> bool
[src]
fn le(&self, other: &ByteIndex) -> bool
[src]
fn gt(&self, other: &ByteIndex) -> bool
[src]
fn ge(&self, other: &ByteIndex) -> bool
[src]
impl StructuralEq for ByteIndex
[src]
impl StructuralPartialEq for ByteIndex
[src]
impl Sub<ByteIndex> for ByteIndex
[src]
type Output = ByteOffset
The resulting type after applying the -
operator.
fn sub(self, rhs: ByteIndex) -> ByteOffset
[src]
impl Sub<ByteOffset> for ByteIndex
[src]
type Output = ByteIndex
The resulting type after applying the -
operator.
fn sub(self, rhs: ByteOffset) -> ByteIndex
[src]
impl SubAssign<ByteOffset> for ByteIndex
[src]
fn sub_assign(&mut self, rhs: ByteOffset)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ByteIndex
impl Send for ByteIndex
impl Sync for ByteIndex
impl Unpin for ByteIndex
impl UnwindSafe for ByteIndex
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,