[][src]Struct syntax::ptr::P

pub struct P<T: ?Sized> {
    ptr: Box<T>,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

An owned smart pointer.

Fields

ptr: Box<T>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Methods

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

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Equivalent to and_then(|x| x).

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Produce a new P<T> from self without reallocating.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Optionally produce a new P<T> from self without reallocating.

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

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

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

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

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

fn from(expr: P<Expr>) -> Self[src]

Converts the expr: P<Expr> into LhsExpr::AlreadyParsed(expr).

This conversion does not allocate.

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

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: 'static + Clone> Clone for P<T>[src]

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

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

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

Creates an empty P<[T]>.

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

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

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

type Target = T

The resulting type after dereferencing.

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

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

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

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

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

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

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

impl<CTX, T: ?Sized> HashStable<CTX> for P<T> where
    T: HashStable<CTX>, 
[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

impl<T> From<T> for T[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> ToString for T where
    T: Display + ?Sized
[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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<E> SpecializationError for E[src]