[][src]Struct syntex_syntax2::ptr::P

pub struct P<T: ?Sized> { /* fields omitted */ }

An owned smart pointer.

Methods

impl<T: 'static> P<T>[src]

pub fn and_then<U, F>(self, f: F) -> U where
    F: FnOnce(T) -> U, 
[src]

Move out of the pointer. Intended for chaining transformations not covered by map.

pub fn unwrap(self) -> T[src]

Equivalent to and_then(|x| x)

pub fn map<F>(self, f: F) -> P<T> where
    F: FnOnce(T) -> T, 
[src]

Transform the inner value, consuming self and producing a new P<T>.

impl<T> P<[T]>[src]

pub fn new() -> P<[T]>[src]

pub fn from_vec(v: Vec<T>) -> P<[T]>[src]

pub fn into_vec(self) -> Vec<T>[src]

Trait Implementations

impl<T> MoveMap<T> for P<[T]>[src]

fn move_map<F>(self, f: F) -> Self where
    F: FnMut(T) -> T, 
[src]

impl<T: HasAttrs + 'static> HasAttrs for P<T>[src]

impl ToTokens for P<Item>[src]

impl ToTokens for P<ImplItem>[src]

impl ToTokens for P<Expr>[src]

impl ToTokens for P<Pat>[src]

impl ToTokens for P<Block>[src]

impl<T: PartialOrd + ?Sized> PartialOrd<P<T>> for P<T>[src]

impl<T: PartialEq + ?Sized> PartialEq<P<T>> for P<T>[src]

impl<T: Ord + ?Sized> Ord for P<T>[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<T> IntoIterator for P<[T]>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

impl<'a, T> IntoIterator for &'a P<[T]>[src]

type Item = &'a T

The type of the elements being iterated over.

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?

impl<T: Eq + ?Sized> Eq for P<T>[src]

impl<T> Default for P<[T]>[src]

fn default() -> P<[T]>[src]

Creates an empty P<[T]>.

impl From<P<Expr>> for LhsExpr[src]

impl<T> From<Vec<T>> for P<[T]>[src]

impl<T> Into<Vec<T>> for P<[T]>[src]

impl<T: 'static + Clone> Clone for P<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Clone> Clone for P<[T]>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: ?Sized> Deref for P<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Hash + ?Sized> Hash for P<T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: ?Sized + Debug> Debug for P<T>[src]

impl<T: Display> Display for P<T>[src]

impl<T> FromIterator<T> for P<[T]>[src]

impl<T> Pointer for P<T>[src]

impl<'de, T> Deserialize<'de> for P<T> where
    T: Deserialize<'de> + 'static, 
[src]

impl<'de, T> Deserialize<'de> for P<[T]> where
    T: Deserialize<'de>, 
[src]

impl<T> Serialize for P<T> where
    T: Serialize
[src]

impl<T> Serialize for P<[T]> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T: ?Sized> Send for P<T> where
    T: Send

impl<T: ?Sized> Unpin for P<T>

impl<T: ?Sized> Sync for P<T> where
    T: Sync

impl<T: ?Sized> UnwindSafe for P<T> where
    T: UnwindSafe

impl<T: ?Sized> RefUnwindSafe for P<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]