pub struct P<T: ?Sized> {
ptr: Box<T>,
}
Expand description
An owned smart pointer.
See the module level documentation for details.
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> DynSend for P<T>
impl<T> DynSync for P<T>
impl<T> Freeze for P<T>where
T: ?Sized,
impl<T> RefUnwindSafe for P<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for P<T>
impl<T> Sync for P<T>
impl<T> Unpin for P<T>where
T: ?Sized,
impl<T> UnwindSafe for P<T>where
T: UnwindSafe + ?Sized,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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.