Struct syntex_syntax::ptr::P
[−]
[src]
pub struct P<T> { // some fields omitted }
An owned smart pointer.
Methods
impl<T: 'static> P<T>
[src]
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>
[src]
fn name(&self) -> InternedString
Retrieve the name of the meta item, e.g. foo
in #[foo]
, #[foo="bar"]
and #[foo(bar)]
Read more
fn value_str(&self) -> Option<InternedString>
Gets the string value if self is a MetaNameValue variant containing a string, otherwise None. Read more
fn meta_item_list(&self) -> Option<&[P<MetaItem>]>
Gets a list of inner meta items from a list MetaItem type.
fn span(&self) -> Span
fn check_name(&self, name: &str) -> bool
impl WithAttrs for P<Expr>
[src]
fn with_attrs(self, attrs: ThinAttributes) -> Self
impl WithAttrs for P<Item>
[src]
fn with_attrs(self, attrs: ThinAttributes) -> Self
impl WithAttrs for P<Local>
[src]
fn with_attrs(self, attrs: ThinAttributes) -> Self
impl WithAttrs for P<Decl>
[src]
fn with_attrs(self, attrs: ThinAttributes) -> Self
impl WithAttrs for P<Stmt>
[src]
fn with_attrs(self, attrs: ThinAttributes) -> Self
impl<T> Deref for P<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref<'a>(&'a self) -> &'a T
The method called to dereference a value
impl<T: 'static + Clone> Clone for P<T>
[src]
fn clone(&self) -> P<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for P<T>
[src]
fn eq(&self, other: &P<T>) -> bool
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
This method tests for !=
.
impl<T: Eq> Eq for P<T>
[src]
impl<T: Debug> Debug for P<T>
[src]
impl<T: Display> Display for P<T>
[src]
impl<T> Pointer for P<T>
[src]
impl<T: Hash> Hash for P<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.