Struct syntax::ptr::PUnstable [-] [+] [src]

pub struct P<T> {
    // some fields omitted
}

An owned smart pointer.

Methods

impl<T: 'static> P<T>

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

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

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

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

Trait Implementations

impl AttrMetaMethods for P<MetaItem>

fn name(&self) -> InternedString

fn value_str(&self) -> Option<InternedString>

fn meta_item_list<'a>(&'a self) -> Option<&'a [P<MetaItem>]>

fn span(&self) -> Span

fn check_name(&self, name: &str) -> bool

impl<T> Deref for P<T>

type Target = T

fn deref<'a>(&'a self) -> &'a T

impl<T: 'static + Clone> Clone for P<T>

fn clone(&self) -> P<T>

fn clone_from(&mut self, source: &Self)

impl<T: PartialEq> PartialEq for P<T>

fn eq(&self, other: &P<T>) -> bool

fn ne(&self, other: &Rhs) -> bool

impl<T: Eq> Eq for P<T>

fn assert_receiver_is_total_eq(&self)

impl<T: Debug> Debug for P<T>

fn fmt(&self, f: &mut Formatter) -> Result

impl<T: Display> Display for P<T>

fn fmt(&self, f: &mut Formatter) -> Result

impl<T: Hash> Hash for P<T>

fn hash<H: Hasher>(&self, state: &mut H)

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

impl<T: 'static + Decodable> Decodable for P<T>

fn decode<D: Decoder>(d: &mut D) -> Result<P<T>, Error>

impl<T: Encodable> Encodable for P<T>

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), Error>

impl ToSource for P<Item>

fn to_source(&self) -> String

impl ToSource for P<Method>

fn to_source(&self) -> String

impl ToSource for P<Stmt>

fn to_source(&self) -> String

impl ToSource for P<Expr>

fn to_source(&self) -> String

impl ToSource for P<Pat>

fn to_source(&self) -> String

impl ToTokens for P<Item>

fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree>

impl ToTokens for P<Pat>

fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree>

impl ToTokens for P<Method>

fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree>

impl ToTokens for P<Stmt>

fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree>

impl ToTokens for P<Expr>

fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree>