[−][src]Struct async_graphql_parser::Positioned
An AST node that stores its original position.
Fields
pos: Pos
The position of the node.
node: T
The node itself.
Implementations
impl<T> Positioned<T>
[src]
#[must_use]pub const fn new(node: T, pos: Pos) -> Positioned<T>
[src]
Create a new positioned node from the node and its position.
pub fn into_inner(self) -> T
[src]
Get the inner node.
This is most useful in callback chains where Positioned::into_inner
is easier to read than
|positioned| positioned.node
.
#[must_use]pub fn position_node<U>(&self, other: U) -> Positioned<U>
[src]
Create a new positioned node with the same position as this one.
#[must_use]pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Positioned<U>
[src]
Map the inner value of this positioned node.
Trait Implementations
impl Borrow<str> for Positioned<String>
[src]
impl BorrowMut<str> for Positioned<String>
[src]
fn borrow_mut(&mut self) -> &mut str
[src]
impl<T: Clone + ?Sized> Clone for Positioned<T>
[src]
fn clone(&self) -> Positioned<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy + ?Sized> Copy for Positioned<T>
[src]
impl<T: Debug + ?Sized> Debug for Positioned<T>
[src]
impl<T: Default + ?Sized> Default for Positioned<T>
[src]
fn default() -> Positioned<T>
[src]
impl<T: Display> Display for Positioned<T>
[src]
impl<T: Eq> Eq for Positioned<T>
[src]
impl<T: Hash> Hash for Positioned<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Ord> Ord for Positioned<T>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<Positioned<T>> for Positioned<T>
[src]
impl<T: PartialOrd> PartialOrd<Positioned<T>> for Positioned<T>
[src]
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for Positioned<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T: ?Sized> Send for Positioned<T> where
T: Send,
T: Send,
impl<T: ?Sized> Sync for Positioned<T> where
T: Sync,
T: Sync,
impl<T: ?Sized> Unpin for Positioned<T> where
T: Unpin,
T: Unpin,
impl<T: ?Sized> UnwindSafe for Positioned<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RuleType for T where
T: Eq + Ord + Copy + Debug + Hash,
[src]
T: Eq + Ord + Copy + Debug + Hash,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,