Struct rustc_span::RelativeBytePos
source · pub struct RelativeBytePos(pub u32);
Expand description
A byte offset relative to file beginning.
Tuple Fields§
§0: u32
Trait Implementations§
source§impl Add<RelativeBytePos> for NonNarrowChar
impl Add<RelativeBytePos> for NonNarrowChar
§type Output = NonNarrowChar
type Output = NonNarrowChar
The resulting type after applying the
+
operator.source§fn add(self, rhs: RelativeBytePos) -> Self
fn add(self, rhs: RelativeBytePos) -> Self
Performs the
+
operation. Read moresource§impl Add<RelativeBytePos> for RelativeBytePos
impl Add<RelativeBytePos> for RelativeBytePos
§type Output = RelativeBytePos
type Output = RelativeBytePos
The resulting type after applying the
+
operator.source§fn add(self, rhs: RelativeBytePos) -> RelativeBytePos
fn add(self, rhs: RelativeBytePos) -> RelativeBytePos
Performs the
+
operation. Read moresource§impl Clone for RelativeBytePos
impl Clone for RelativeBytePos
source§fn clone(&self) -> RelativeBytePos
fn clone(&self) -> RelativeBytePos
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RelativeBytePos
impl Debug for RelativeBytePos
source§impl<D: Decoder> Decodable<D> for RelativeBytePos
impl<D: Decoder> Decodable<D> for RelativeBytePos
fn decode(d: &mut D) -> RelativeBytePos
source§impl Hash for RelativeBytePos
impl Hash for RelativeBytePos
source§impl<H: HashStableContext> HashStable<H> for RelativeBytePos
impl<H: HashStableContext> HashStable<H> for RelativeBytePos
fn hash_stable(&self, hcx: &mut H, hasher: &mut StableHasher)
source§impl Ord for RelativeBytePos
impl Ord for RelativeBytePos
source§fn cmp(&self, other: &RelativeBytePos) -> Ordering
fn cmp(&self, other: &RelativeBytePos) -> Ordering
1.21.0 · 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 PartialEq<RelativeBytePos> for RelativeBytePos
impl PartialEq<RelativeBytePos> for RelativeBytePos
source§fn eq(&self, other: &RelativeBytePos) -> bool
fn eq(&self, other: &RelativeBytePos) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RelativeBytePos> for RelativeBytePos
impl PartialOrd<RelativeBytePos> for RelativeBytePos
source§fn partial_cmp(&self, other: &RelativeBytePos) -> Option<Ordering>
fn partial_cmp(&self, other: &RelativeBytePos) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Pos for RelativeBytePos
impl Pos for RelativeBytePos
source§impl Sub<RelativeBytePos> for NonNarrowChar
impl Sub<RelativeBytePos> for NonNarrowChar
§type Output = NonNarrowChar
type Output = NonNarrowChar
The resulting type after applying the
-
operator.source§fn sub(self, rhs: RelativeBytePos) -> Self
fn sub(self, rhs: RelativeBytePos) -> Self
Performs the
-
operation. Read moresource§impl Sub<RelativeBytePos> for RelativeBytePos
impl Sub<RelativeBytePos> for RelativeBytePos
§type Output = RelativeBytePos
type Output = RelativeBytePos
The resulting type after applying the
-
operator.source§fn sub(self, rhs: RelativeBytePos) -> RelativeBytePos
fn sub(self, rhs: RelativeBytePos) -> RelativeBytePos
Performs the
-
operation. Read moreimpl Copy for RelativeBytePos
impl Eq for RelativeBytePos
impl StructuralEq for RelativeBytePos
impl StructuralPartialEq for RelativeBytePos
Auto Trait Implementations§
impl RefUnwindSafe for RelativeBytePos
impl Send for RelativeBytePos
impl Sync for RelativeBytePos
impl Unpin for RelativeBytePos
impl UnwindSafe for RelativeBytePos
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes