Type Alias gluon_base::source::FileId

source ·
pub type FileId = BytePos;

Aliased Type§

struct FileId(pub u32);

Fields§

§0: u32

Implementations§

source§

impl ByteIndex

source

pub const fn to_usize(self) -> usize

Convert the position into a usize, for use in array indexing

Trait Implementations§

source§

impl Add<ByteOffset> for ByteIndex

§

type Output = ByteIndex

The resulting type after applying the + operator.
source§

fn add(self, rhs: ByteOffset) -> ByteIndex

Performs the + operation. Read more
source§

impl AddAssign<ByteOffset> for ByteIndex

source§

fn add_assign(&mut self, rhs: ByteOffset)

Performs the += operation. Read more
source§

impl<'ast, Id> AstClone<'ast, Id> for BytePos

source§

fn ast_clone(&self, _arena: ArenaRef<'_, 'ast, Id>) -> Self

source§

impl Clone for ByteIndex

source§

fn clone(&self) -> ByteIndex

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ByteIndex

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ByteIndex

source§

fn default() -> ByteIndex

Returns the “default value” for a type. Read more
source§

impl Display for ByteIndex

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<u32> for ByteIndex

source§

fn from(i: u32) -> ByteIndex

Converts to this type from the input type.
source§

impl Hash for ByteIndex

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Index for ByteIndex

source§

impl Ord for ByteIndex

source§

fn cmp(&self, other: &ByteIndex) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<ByteIndex> for ByteIndex

source§

fn eq(&self, other: &ByteIndex) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<ByteIndex> for ByteIndex

source§

fn partial_cmp(&self, other: &ByteIndex) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Sub<ByteIndex> for ByteIndex

§

type Output = ByteOffset

The resulting type after applying the - operator.
source§

fn sub(self, rhs: ByteIndex) -> ByteOffset

Performs the - operation. Read more
source§

impl Sub<ByteOffset> for ByteIndex

§

type Output = ByteIndex

The resulting type after applying the - operator.
source§

fn sub(self, rhs: ByteOffset) -> ByteIndex

Performs the - operation. Read more
source§

impl SubAssign<ByteOffset> for ByteIndex

source§

fn sub_assign(&mut self, rhs: ByteOffset)

Performs the -= operation. Read more
source§

impl Copy for ByteIndex

source§

impl Eq for ByteIndex

source§

impl StructuralEq for ByteIndex

source§

impl StructuralPartialEq for ByteIndex