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>
[src]
fn value(&self) -> &T
[src]
fn pos(&self) -> &Pos
[src]
fn take(self) -> T
[src]
fn take_pair(self) -> (T, Pos)
[src]
fn as_ref_pair(&self) -> (&T, &Pos)
[src]
fn map<U, O>(self, op: O) -> Loc<U> where
O: FnOnce(T) -> U,
[src]
O: FnOnce(T) -> U,
fn and_then<U, O, E: WithPos>(self, op: O) -> Result<U, E> where
O: FnOnce(T) -> Result<U, E>,
[src]
O: FnOnce(T) -> Result<U, E>,
fn loc_ref(&self) -> Loc<&T>
[src]
fn as_ref(&self) -> Loc<&T>
[src]
Trait Implementations
impl<T: Clone> Clone for Loc<T>
[src]
fn clone(&self) -> Loc<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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,
[src]
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
[src]
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]
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>
[src]
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]
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]
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]
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]
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
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
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,
[src]
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[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T> Deref for Loc<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
Dereferences the value.
impl<T> AsMut<T> for Loc<T>
[src]
impl<T> Display for Loc<T> where
T: Display,
[src]
T: Display,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Debug for Loc<T> where
T: Debug,
[src]
T: Debug,