Struct ucglib::ast::Positioned [−][src]
pub struct Positioned<T> { pub pos: Position, pub val: T, }
Adds position information to any type T
.
Fields
pos: Position
val: T
Methods
impl<T> Positioned<T>
[src]
impl<T> Positioned<T>
pub fn new(v: T, l: usize, c: usize) -> Self
[src]
pub fn new(v: T, l: usize, c: usize) -> Self
Constructs a new Positioned
pub fn new_with_pos(v: T, pos: Position) -> Self
[src]
pub fn new_with_pos(v: T, pos: Position) -> Self
Constructs a new Positioned
Trait Implementations
impl<T: Debug> Debug for Positioned<T>
[src]
impl<T: Debug> Debug for Positioned<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Clone> Clone for Positioned<T>
[src]
impl<T: Clone> Clone for Positioned<T>
fn clone(&self) -> Positioned<T>
[src]
fn clone(&self) -> Positioned<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Display> Display for Positioned<T>
[src]
impl<T: Display> Display for Positioned<T>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T: PartialEq> PartialEq for Positioned<T>
[src]
impl<T: PartialEq> PartialEq for Positioned<T>
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T: Eq> Eq for Positioned<T>
[src]
impl<T: Eq> Eq for Positioned<T>
impl<T: Ord> Ord for Positioned<T>
[src]
impl<T: Ord> Ord for Positioned<T>
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T: PartialOrd> PartialOrd for Positioned<T>
[src]
impl<T: PartialOrd> PartialOrd for Positioned<T>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
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
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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
impl<T: Hash> Hash for Positioned<T>
[src]
impl<T: Hash> Hash for Positioned<T>
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> From<&'a Token> for Positioned<String>
[src]
impl<'a> From<&'a Token> for Positioned<String>
fn from(t: &'a Token) -> Positioned<String>
[src]
fn from(t: &'a Token) -> Positioned<String>
Performs the conversion.
impl<'a> From<&'a Positioned<String>> for Positioned<String>
[src]
impl<'a> From<&'a Positioned<String>> for Positioned<String>
fn from(t: &Positioned<String>) -> Positioned<String>
[src]
fn from(t: &Positioned<String>) -> Positioned<String>
Performs the conversion.
Auto Trait Implementations
impl<T> Send for Positioned<T> where
T: Send,
impl<T> Send for Positioned<T> where
T: Send,
impl<T> Sync for Positioned<T> where
T: Sync,
impl<T> Sync for Positioned<T> where
T: Sync,