pub type P<T> = Box<T>;
Expand description
A pointer type that uniquely owns a heap allocation of type T.
This used to be its own type, but now it’s just a typedef for Box
and we are planning to
remove it soon.
Aliased Type§
pub struct P<T>(/* private fields */);
Trait Implementations§
Source§impl From<AngleBracketedArgs> for P<GenericArgs>
impl From<AngleBracketedArgs> for P<GenericArgs>
Source§fn from(val: AngleBracketedArgs) -> Self
fn from(val: AngleBracketedArgs) -> Self
Converts to this type from the input type.
Source§impl From<ParenthesizedArgs> for P<GenericArgs>
impl From<ParenthesizedArgs> for P<GenericArgs>
Source§fn from(val: ParenthesizedArgs) -> Self
fn from(val: ParenthesizedArgs) -> Self
Converts to this type from the input type.
Source§impl<T: HasAttrs> HasAttrs for P<T>
impl<T: HasAttrs> HasAttrs for P<T>
Source§const SUPPORTS_CUSTOM_INNER_ATTRS: bool = T::SUPPORTS_CUSTOM_INNER_ATTRS
const SUPPORTS_CUSTOM_INNER_ATTRS: bool = T::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 AttrVec))
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes