pub struct P<T: ?Sized> {
ptr: Box<T>,
}
Expand description
An owned smart pointer.
Fields§
§ptr: Box<T>
Implementations§
source§impl<T: 'static> P<T>
impl<T: 'static> P<T>
sourcepub fn and_then<U, F>(self, f: F) -> Uwhere
F: FnOnce(T) -> U,
pub fn and_then<U, F>(self, f: F) -> Uwhere
F: FnOnce(T) -> U,
Move out of the pointer.
Intended for chaining transformations not covered by map
.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Equivalent to and_then(|x| x)
.
Trait Implementations§
source§impl<T: DummyAstNode + 'static> DummyAstNode for P<T>
impl<T: DummyAstNode + 'static> DummyAstNode for P<T>
source§impl<T> FromIterator<T> for P<[T]>
impl<T> FromIterator<T> for P<[T]>
source§impl<CTX, T> HashStable<CTX> for P<T>where
T: ?Sized + HashStable<CTX>,
impl<CTX, T> HashStable<CTX> for P<T>where
T: ?Sized + HashStable<CTX>,
fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher)
source§impl Into<P<GenericArgs>> for AngleBracketedArgs
impl Into<P<GenericArgs>> for AngleBracketedArgs
source§fn into(self) -> P<GenericArgs>
fn into(self) -> P<GenericArgs>
Converts this type into the (usually inferred) input type.
source§impl Into<P<GenericArgs>> for ParenthesizedArgs
impl Into<P<GenericArgs>> for ParenthesizedArgs
source§fn into(self) -> P<GenericArgs>
fn into(self) -> P<GenericArgs>
Converts this type into the (usually inferred) input type.
source§impl<'a, T> IntoIterator for &'a P<[T]>
impl<'a, T> IntoIterator for &'a P<[T]>
source§impl<T> IntoIterator for P<[T]>
impl<T> IntoIterator for P<[T]>
Auto Trait Implementations§
impl<T: ?Sized> DynSend for P<T>where
T: DynSend,
impl<T: ?Sized> DynSync for P<T>where
T: DynSync,
impl<T: ?Sized> Freeze for P<T>
impl<T: ?Sized> RefUnwindSafe for P<T>where
T: RefUnwindSafe,
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,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> HasAttrs for T
impl<T> HasAttrs for T
source§const SUPPORTS_CUSTOM_INNER_ATTRS: bool = const SUPPORTS_CUSTOM_INNER_ATTRS: bool =
<T::Target>::SUPPORTS_CUSTOM_INNER_ATTRS;
const SUPPORTS_CUSTOM_INNER_ATTRS: bool = const SUPPORTS_CUSTOM_INNER_ATTRS: bool = <T::Target>::SUPPORTS_CUSTOM_INNER_ATTRS;
This is
true
if this HasAttrs
might support ‘custom’ (proc-macro) inner
attributes. Attributes like #![cfg]
and #![cfg_attr]
are not
considered ‘custom’ attributes. Read morefn attrs(&self) -> &[Attribute]
fn visit_attrs(&mut self, f: impl FnOnce(&mut ThinVec<Attribute>))
source§impl<T> HasTokens for T
impl<T> HasTokens for T
fn tokens(&self) -> Option<&LazyAttrTokenStream>
fn tokens_mut(&mut self) -> Option<&mut Option<LazyAttrTokenStream>>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.