Struct syntax::ptr::P [−][src]
pub struct P<T: ?Sized> { /* fields omitted */ }
An owned smart pointer.
Methods
impl<T: 'static> P<T>[src]
impl<T: 'static> P<T>pub fn and_then<U, F>(self, f: F) -> U where
F: FnOnce(T) -> U, [src]
pub 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.
pub fn into_inner(self) -> T[src]
pub fn into_inner(self) -> TEquivalent to and_then(|x| x)
pub fn map<F>(self, f: F) -> P<T> where
F: FnOnce(T) -> T, [src]
pub 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>.
impl<T> P<[T]>[src]
impl<T> P<[T]>pub fn new() -> P<[T]>[src]
pub fn new() -> P<[T]>pub fn from_vec(v: Vec<T>) -> P<[T]>[src]
pub fn from_vec(v: Vec<T>) -> P<[T]>pub fn into_vec(self) -> Vec<T>[src]
pub fn into_vec(self) -> Vec<T>Trait Implementations
impl<T> MoveMap<T> for P<[T]>[src]
impl<T> MoveMap<T> for P<[T]>fn move_flat_map<F, I>(self, f: F) -> Self where
F: FnMut(T) -> I,
I: IntoIterator<Item = T>, [src]
fn move_flat_map<F, I>(self, f: F) -> Self where
F: FnMut(T) -> I,
I: IntoIterator<Item = T>, fn move_map<F>(self, f: F) -> Self where
F: FnMut(T) -> T, [src]
fn move_map<F>(self, f: F) -> Self where
F: FnMut(T) -> T, impl<T: HasAttrs + 'static> HasAttrs for P<T>[src]
impl<T: HasAttrs + 'static> HasAttrs for P<T>fn attrs(&self) -> &[Attribute][src]
fn attrs(&self) -> &[Attribute]fn map_attrs<F: FnOnce(Vec<Attribute>) -> Vec<Attribute>>(self, f: F) -> Self[src]
fn map_attrs<F: FnOnce(Vec<Attribute>) -> Vec<Attribute>>(self, f: F) -> Selfimpl<T: Hash + ?Sized> Hash for P<T>[src]
impl<T: Hash + ?Sized> Hash for P<T>fn hash<__HT: Hasher>(&self, state: &mut __HT)[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl<T: PartialEq + ?Sized> PartialEq for P<T>[src]
impl<T: PartialEq + ?Sized> PartialEq for P<T>fn eq(&self, other: &P<T>) -> bool[src]
fn eq(&self, other: &P<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &P<T>) -> bool[src]
fn ne(&self, other: &P<T>) -> boolThis method tests for !=.
impl<T: Eq + ?Sized> Eq for P<T>[src]
impl<T: Eq + ?Sized> Eq for P<T>impl<T: ?Sized> Deref for P<T>[src]
impl<T: ?Sized> Deref for P<T>type Target = T
The resulting type after dereferencing.
ⓘImportant traits for &'a mut Rfn deref(&self) -> &T[src]
fn deref(&self) -> &TDereferences the value.
impl<T: 'static + Clone> Clone for P<T>[src]
impl<T: 'static + Clone> Clone for P<T>fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T: ?Sized + Debug> Debug for P<T>[src]
impl<T: ?Sized + Debug> Debug for P<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Display> Display for P<T>[src]
impl<T: Display> Display for P<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T> Pointer for P<T>[src]
impl<T> Pointer for P<T>impl<T: 'static + Decodable> Decodable for P<T>[src]
impl<T: 'static + Decodable> Decodable for P<T>impl<T: Encodable> Encodable for P<T>[src]
impl<T: Encodable> Encodable for P<T>impl<T> Default for P<[T]>[src]
impl<T> Default for P<[T]>impl<T: Clone> Clone for P<[T]>[src]
impl<T: Clone> Clone for P<[T]>fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T> From<Vec<T>> for P<[T]>[src]
impl<T> From<Vec<T>> for P<[T]>impl<T> Into<Vec<T>> for P<[T]>[src]
impl<T> Into<Vec<T>> for P<[T]>impl<T> FromIterator<T> for P<[T]>[src]
impl<T> FromIterator<T> for P<[T]>fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> P<[T]>[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> P<[T]>Creates a value from an iterator. Read more
impl<T> IntoIterator for P<[T]>[src]
impl<T> IntoIterator for P<[T]>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]
fn into_iter(self) -> Self::IntoIterCreates an iterator from a value. Read more
impl<'a, T> IntoIterator for &'a P<[T]>[src]
impl<'a, T> IntoIterator for &'a P<[T]>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]
fn into_iter(self) -> Self::IntoIterCreates an iterator from a value. Read more
impl<T: Encodable> Encodable for P<[T]>[src]
impl<T: Encodable> Encodable for P<[T]>impl<T: Decodable> Decodable for P<[T]>[src]
impl<T: Decodable> Decodable for P<[T]>impl<CTX, T: ?Sized> HashStable<CTX> for P<T> where
T: HashStable<CTX>, [src]
impl<CTX, T: ?Sized> HashStable<CTX> for P<T> where
T: HashStable<CTX>, fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut CTX,
hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut CTX,
hasher: &mut StableHasher<W>
)impl ToTokens for P<Item>[src]
impl ToTokens for P<Item>impl ToTokens for P<ImplItem>[src]
impl ToTokens for P<ImplItem>impl ToTokens for P<Expr>[src]
impl ToTokens for P<Expr>impl ToTokens for P<Pat>[src]
impl ToTokens for P<Pat>impl ToTokens for P<Block>[src]
impl ToTokens for P<Block>