Type Alias P

Source
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>

Source§

fn from(val: AngleBracketedArgs) -> Self

Converts to this type from the input type.
Source§

impl From<ParenthesizedArgs> for P<GenericArgs>

Source§

fn from(val: ParenthesizedArgs) -> Self

Converts to this type from the input type.
Source§

impl<T: HasAttrs> HasAttrs for P<T>

Source§

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 more
Source§

fn attrs(&self) -> &[Attribute]

Source§

fn visit_attrs(&mut self, f: impl FnOnce(&mut AttrVec))

Source§

impl<T: HasNodeId> HasNodeId for P<T>

Source§

fn node_id(&self) -> NodeId

Source§

fn node_id_mut(&mut self) -> &mut NodeId

Source§

impl<T: HasTokens> HasTokens for P<T>

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

OSZAR »