Struct reproto_core::Loc
[−]
[src]
pub struct Loc<T> { /* fields omitted */ }
Methods
impl<T> Loc<T>
[src]
fn new<P: Into<Pos>>(inner: T, pos: P) -> Loc<T>
fn move_inner(self) -> T
fn pos(&self) -> &Pos
fn map_into<M, U>(self, map: M) -> Loc<U> where
M: FnOnce(T) -> U,
M: FnOnce(T) -> U,
fn map<'a, M, U>(&'a self, map: M) -> Loc<U> where
M: FnOnce(&'a T) -> U,
U: 'a,
M: FnOnce(&'a T) -> U,
U: 'a,
fn both(self) -> (T, Pos)
fn ref_both(&self) -> (&T, &Pos)
Trait Implementations
impl<T: Clone> Clone for Loc<T>
[src]
fn clone(&self) -> Loc<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Serialize> Serialize for Loc<T>
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> PartialEq for Loc<T> where
T: PartialEq,
[src]
T: PartialEq,
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
This method tests for !=
.
impl<T> Eq for Loc<T> where
T: Eq,
[src]
T: Eq,
impl<T> PartialOrd for Loc<T> where
T: PartialOrd,
[src]
T: PartialOrd,
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
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
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
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
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> Ord for Loc<T> where
T: Ord,
Self: PartialOrd + Eq,
[src]
T: Ord,
Self: PartialOrd + Eq,
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl<T> Hash for Loc<T> where
T: Hash,
[src]
T: Hash,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T> Merge for Loc<T> where
T: Merge,
[src]
T: Merge,
impl<T> Deref for Loc<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> Borrow<T> for Loc<T>
[src]
impl<T> AsRef<T> for Loc<T>
[src]
fn as_ref(&self) -> &T
Performs the conversion.
impl<T> AsMut<T> for Loc<T>
[src]
fn as_mut(&mut self) -> &mut T
Performs the conversion.
impl<T> Display for Loc<T> where
T: Display,
[src]
T: Display,
impl<T> Debug for Loc<T> where
T: Debug,
[src]
T: Debug,