Skip to main content

Item

Enum Item 

Source
pub enum Item {
Show 15 variants AttributeContaining(AttributeContaining), Const(Const), Enum(Enum), ExternCrate(Crate), ExternBlock(ExternBlock), Function(Function), Impl(Impl), MacroCall(MacroCall), Module(Module), Static(Static), Struct(Struct), Trait(Trait), TypeAlias(TypeAlias), Use(Use), Union(Union),
}

Variants§

§

AttributeContaining(AttributeContaining)

§

Const(Const)

§

Enum(Enum)

§

ExternCrate(Crate)

§

ExternBlock(ExternBlock)

§

Function(Function)

§

Impl(Impl)

§

MacroCall(MacroCall)

§

Module(Module)

§

Static(Static)

§

Struct(Struct)

§

Trait(Trait)

§

TypeAlias(TypeAlias)

§

Use(Use)

§

Union(Union)

Implementations§

Source§

impl Item

Source

pub fn into_attribute_containing(self) -> Option<AttributeContaining>

Source

pub fn into_const(self) -> Option<Const>

Source

pub fn into_enum(self) -> Option<Enum>

Source

pub fn into_extern_crate(self) -> Option<Crate>

Source

pub fn into_extern_block(self) -> Option<ExternBlock>

Source

pub fn into_function(self) -> Option<Function>

Source

pub fn into_impl(self) -> Option<Impl>

Source

pub fn into_macro_call(self) -> Option<MacroCall>

Source

pub fn into_module(self) -> Option<Module>

Source

pub fn into_static(self) -> Option<Static>

Source

pub fn into_struct(self) -> Option<Struct>

Source

pub fn into_trait(self) -> Option<Trait>

Source

pub fn into_type_alias(self) -> Option<TypeAlias>

Source

pub fn into_use(self) -> Option<Use>

Source

pub fn into_union(self) -> Option<Union>

Source

pub fn as_attribute_containing(&self) -> Option<&AttributeContaining>

Source

pub fn as_const(&self) -> Option<&Const>

Source

pub fn as_enum(&self) -> Option<&Enum>

Source

pub fn as_extern_crate(&self) -> Option<&Crate>

Source

pub fn as_extern_block(&self) -> Option<&ExternBlock>

Source

pub fn as_function(&self) -> Option<&Function>

Source

pub fn as_impl(&self) -> Option<&Impl>

Source

pub fn as_macro_call(&self) -> Option<&MacroCall>

Source

pub fn as_module(&self) -> Option<&Module>

Source

pub fn as_static(&self) -> Option<&Static>

Source

pub fn as_struct(&self) -> Option<&Struct>

Source

pub fn as_trait(&self) -> Option<&Trait>

Source

pub fn as_type_alias(&self) -> Option<&TypeAlias>

Source

pub fn as_use(&self) -> Option<&Use>

Source

pub fn as_union(&self) -> Option<&Union>

Source

pub fn is_attribute_containing(&self) -> bool

Source

pub fn is_const(&self) -> bool

Source

pub fn is_enum(&self) -> bool

Source

pub fn is_extern_crate(&self) -> bool

Source

pub fn is_extern_block(&self) -> bool

Source

pub fn is_function(&self) -> bool

Source

pub fn is_impl(&self) -> bool

Source

pub fn is_macro_call(&self) -> bool

Source

pub fn is_module(&self) -> bool

Source

pub fn is_static(&self) -> bool

Source

pub fn is_struct(&self) -> bool

Source

pub fn is_trait(&self) -> bool

Source

pub fn is_type_alias(&self) -> bool

Source

pub fn is_use(&self) -> bool

Source

pub fn is_union(&self) -> bool

Trait Implementations§

Source§

impl Debug for Item

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HasExtent for Item

Source§

fn extent(&self) -> Extent

Source§

impl<'a> Index<&'a Item> for str

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, i: &'a Item) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Item> for str

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, i: Item) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Visit for Item

Source§

fn visit<'ast, V>(&'ast self, v: &mut V)
where V: Visitor<'ast>,

Source§

fn visit_mut<V>(&mut self, v: &mut V)
where V: VisitorMut,

Auto Trait Implementations§

§

impl Freeze for Item

§

impl RefUnwindSafe for Item

§

impl Send for Item

§

impl Sync for Item

§

impl Unpin for Item

§

impl UnsafeUnpin for Item

§

impl UnwindSafe for Item

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.