[−][src]Struct syntax::ptr::P
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]
F: FnOnce(T) -> U,
Move out of the pointer.
Intended for chaining transformations not covered by map
.
pub fn into_inner(self) -> T
[src]
Equivalent to and_then(|x| x)
pub fn map<F>(self, f: F) -> P<T> where
F: FnOnce(T) -> T,
[src]
F: FnOnce(T) -> T,
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]
F: FnOnce(T) -> Option<T>,
Optionally produce a new P<T>
from self
without reallocating.
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: HasAttrs + 'static> HasAttrs for P<T>
[src]
fn attrs(&self) -> &[Attribute]
[src]
fn visit_attrs<F: FnOnce(&mut Vec<Attribute>)>(&mut self, f: F)
[src]
impl<T: Eq + ?Sized> Eq for P<T>
[src]
impl<T> Into<Vec<T>> for P<[T]>
[src]
impl<T: 'static + Clone> Clone for P<T>
[src]
fn clone(&self) -> P<T>
[src]
default 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(&self) -> P<[T]>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq + ?Sized> PartialEq<P<T>> for P<T>
[src]
impl<T> Default 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?
fn into_iter(self) -> Self::IntoIter
[src]
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T> From<Vec<T>> for P<[T]>
[src]
impl<T: Hash + ?Sized> Hash for P<T>
[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)
[src]
default fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Display> Display for P<T>
[src]
impl<T> Pointer for P<T>
[src]
impl<T: ?Sized> Deref for P<T>
[src]
impl<T: ?Sized> DerefMut for P<T>
[src]
impl<T> FromIterator<T> for P<[T]>
[src]
impl<T: ?Sized + Debug> Debug 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]
T: HashStable<CTX>,
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut CTX,
hasher: &mut StableHasher<W>
)
[src]
&self,
hcx: &mut CTX,
hasher: &mut StableHasher<W>
)
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
T: UseSpecializedEncodable + ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
T: UseSpecializedDecodable,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,