Type Alias gluon_base::ast::SpannedIdent

source ·
pub type SpannedIdent<Id> = Spanned<TypedIdent<Id>, BytePos>;

Aliased Type§

struct SpannedIdent<Id> {
    pub span: Span<ByteIndex>,
    pub value: TypedIdent<Id, ArcType<Id>>,
}

Fields§

§span: Span<ByteIndex>§value: TypedIdent<Id, ArcType<Id>>

Implementations§

source§

impl<T, Pos> Spanned<T, Pos>

source

pub fn map<U, F>(self, f: F) -> Spanned<U, Pos>where F: FnMut(T) -> U,

Trait Implementations§

source§

impl<E> AsDiagnostic for Spanned<E, BytePos>where E: AsDiagnostic,

source§

impl<T, Pos> AsId<T> for Spanned<T, Pos>

source§

fn as_id(&self) -> &T

source§

impl<T, U, Pos> AsRef<U> for Spanned<T, Pos>where T: AsRef<U>, U: ?Sized,

source§

fn as_ref(&self) -> &U

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'ast, Id, T, P> AstClone<'ast, Id> for Spanned<T, P>where T: AstClone<'ast, Id>, P: Clone,

source§

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

source§

impl<T: Clone, Pos: Clone> Clone for Spanned<T, Pos>

source§

fn clone(&self) -> Spanned<T, Pos>

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<T: Debug, Pos: Debug> Debug for Spanned<T, Pos>

source§

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

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

impl<T: Default, Pos: Default> Default for Spanned<T, Pos>

source§

fn default() -> Spanned<T, Pos>

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

impl<T, Pos> Deref for Spanned<T, Pos>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T, Pos> DerefMut for Spanned<T, Pos>

source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
source§

impl<T: Display, Pos: Display + Copy> Display for Spanned<T, Pos>

source§

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

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

impl<T, Pos> From<(T, Span<Pos>)> for Spanned<T, Pos>

source§

fn from((value, span): (T, Span<Pos>)) -> Self

Converts to this type from the input type.
source§

impl<T, Pos> From<T> for Spanned<T, Pos>where Pos: Default,

source§

fn from(value: T) -> Self

Converts to this type from the input type.
source§

impl<T, Pos> Hash for Spanned<T, Pos>where T: Hash, Pos: Hash + Copy,

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<T: PartialEq, Pos: PartialEq> PartialEq<Spanned<T, Pos>> for Spanned<T, Pos>

source§

fn eq(&self, other: &Spanned<T, Pos>) -> 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<T, Pos> PartialEq<T> for Spanned<T, Pos>where T: PartialEq,

source§

fn eq(&self, other: &T) -> 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<T: Typed> Typed for Spanned<T, BytePos>

§

type Ident = <T as Typed>::Ident

source§

fn try_type_of( &self, env: &dyn TypeEnv<Type = ArcType> ) -> Result<ArcType<T::Ident>, String>

source§

fn env_type_of(&self, env: &dyn TypeEnv<Type = ArcType>) -> ArcType<Self::Ident>

source§

impl<T: Copy, Pos: Copy> Copy for Spanned<T, Pos>

source§

impl<T: Eq, Pos: Eq> Eq for Spanned<T, Pos>

source§

impl<T, Pos> StructuralEq for Spanned<T, Pos>

source§

impl<T, Pos> StructuralPartialEq for Spanned<T, Pos>