Struct rustemo::ValLoc

source ·
pub struct ValLoc<T> {
    pub location: Option<Location>,
    /* private fields */
}
Expand description

Value with location. Used in place of parsed values which need locations to report errors during semantic analysis.

Fields§

§location: Option<Location>

Implementations§

source§

impl<T> ValLoc<T>

source

pub fn new(value: T, location: Option<Location>) -> Self

Trait Implementations§

source§

impl<T> AsRef<T> for ValLoc<T>

source§

fn as_ref(&self) -> &T

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

impl<T: Clone> Clone for ValLoc<T>

source§

fn clone(&self) -> ValLoc<T>

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> Debug for ValLoc<T>

source§

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

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

impl<T: Display> Display for ValLoc<T>

source§

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

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

impl From<&ValLoc<bool>> for bool
where bool: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<char>> for char
where char: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<f32>> for f32
where f32: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<f64>> for f64
where f64: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<i128>> for i128
where i128: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<i16>> for i16
where i16: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<i32>> for i32
where i32: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<i64>> for i64
where i64: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<i8>> for i8
where i8: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<isize>> for isize
where isize: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<u128>> for u128
where u128: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<u16>> for u16
where u16: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<u32>> for u32
where u32: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<u64>> for u64
where u64: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<u8>> for u8
where u8: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<&ValLoc<usize>> for usize
where usize: Copy,

source§

fn from(value: &ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl<T> From<T> for ValLoc<T>

source§

fn from(value: T) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<String>> for String

source§

fn from(value: ValLoc<String>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<bool>> for bool

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<char>> for char

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<f32>> for f32

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<f64>> for f64

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<i128>> for i128

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<i16>> for i16

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<i32>> for i32

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<i64>> for i64

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<i8>> for i8

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<isize>> for isize

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<u128>> for u128

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<u16>> for u16

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<u32>> for u32

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<u64>> for u64

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<u8>> for u8

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ValLoc<usize>> for usize

source§

fn from(value: ValLoc<Self>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ValLoc<T>
where T: RefUnwindSafe,

§

impl<T> Send for ValLoc<T>
where T: Send,

§

impl<T> Sync for ValLoc<T>
where T: Sync,

§

impl<T> Unpin for ValLoc<T>
where T: Unpin,

§

impl<T> UnwindSafe for ValLoc<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.