pub enum LangItem {
Show 114 variants Sized, Unsize, StructuralPeq, StructuralTeq, Copy, Clone, Sync, DiscriminantKind, Discriminant, PointeeTrait, Metadata, DynMetadata, Freeze, Drop, Destruct, CoerceUnsized, DispatchFromDyn, TransmuteOpts, TransmuteTrait, Add, Sub, Mul, Div, Rem, Neg, Not, BitXor, BitAnd, BitOr, Shl, Shr, AddAssign, SubAssign, MulAssign, DivAssign, RemAssign, BitXorAssign, BitAndAssign, BitOrAssign, ShlAssign, ShrAssign, Index, IndexMut, UnsafeCell, VaList, Deref, DerefMut, DerefTarget, Receiver, Fn, FnMut, FnOnce, FnOnceOutput, Future, GeneratorState, Generator, Unpin, Pin, PartialEq, PartialOrd, Panic, PanicFmt, PanicDisplay, ConstPanicFmt, PanicBoundsCheck, PanicInfo, PanicLocation, PanicImpl, PanicNoUnwind, BeginPanic, ExchangeMalloc, BoxFree, DropInPlace, Oom, AllocLayout, Start, EhPersonality, EhCatchTypeinfo, OwnedBox, PhantomData, ManuallyDrop, MaybeUninit, AlignOffset, Termination, Try, Tuple, SliceLen, TryTraitFromResidual, TryTraitFromOutput, TryTraitBranch, TryTraitFromYeet, PollReady, PollPending, FromGenerator, GetContext, FuturePoll, FromFrom, OptionSome, OptionNone, ResultOk, ResultErr, ControlFlowContinue, ControlFlowBreak, IntoFutureIntoFuture, IntoIterIntoIter, IteratorNext, PinNewUnchecked, RangeFrom, RangeFull, RangeInclusiveStruct, RangeInclusiveNew, Range, RangeToInclusive, RangeTo,
}
Expand description

A representation of all the valid language items in Rust.

Variants

Sized

The sized lang item.

Unsize

The unsize lang item.

StructuralPeq

The structural_peq lang item.

Trait injected by #[derive(PartialEq)], (i.e. “Partial EQ”).

StructuralTeq

The structural_teq lang item.

Trait injected by #[derive(Eq)], (i.e. “Total EQ”; no, I will not apologize).

Copy

The copy lang item.

Clone

The clone lang item.

Sync

The sync lang item.

DiscriminantKind

The discriminant_kind lang item.

Discriminant

The discriminant_type lang item.

The associated item of the [DiscriminantKind] trait.

PointeeTrait

The pointee_trait lang item.

Metadata

The metadata_type lang item.

DynMetadata

The dyn_metadata lang item.

Freeze

The freeze lang item.

Drop

The drop lang item.

Destruct

The destruct lang item.

CoerceUnsized

The coerce_unsized lang item.

DispatchFromDyn

The dispatch_from_dyn lang item.

TransmuteOpts

The transmute_opts lang item.

TransmuteTrait

The transmute_trait lang item.

Add

The add lang item.

Sub

The sub lang item.

Mul

The mul lang item.

Div

The div lang item.

Rem

The rem lang item.

Neg

The neg lang item.

Not

The not lang item.

BitXor

The bitxor lang item.

BitAnd

The bitand lang item.

BitOr

The bitor lang item.

Shl

The shl lang item.

Shr

The shr lang item.

AddAssign

The add_assign lang item.

SubAssign

The sub_assign lang item.

MulAssign

The mul_assign lang item.

DivAssign

The div_assign lang item.

RemAssign

The rem_assign lang item.

BitXorAssign

The bitxor_assign lang item.

BitAndAssign

The bitand_assign lang item.

BitOrAssign

The bitor_assign lang item.

ShlAssign

The shl_assign lang item.

ShrAssign

The shr_assign lang item.

Index

The index lang item.

IndexMut

The index_mut lang item.

UnsafeCell

The unsafe_cell lang item.

VaList

The va_list lang item.

Deref

The deref lang item.

DerefMut

The deref_mut lang item.

DerefTarget

The deref_target lang item.

Receiver

The receiver lang item.

Fn

The Fn lang item.

FnMut

The fn_mut lang item.

FnOnce

The fn_once lang item.

FnOnceOutput

The fn_once_output lang item.

Future

The future_trait lang item.

GeneratorState

The generator_state lang item.

Generator

The generator lang item.

Unpin

The unpin lang item.

Pin

The pin lang item.

PartialEq

The eq lang item.

PartialOrd

The partial_ord lang item.

Panic

The panic lang item.

PanicFmt

The panic_fmt lang item.

PanicDisplay

The panic_display lang item.

ConstPanicFmt

The const_panic_fmt lang item.

PanicBoundsCheck

The panic_bounds_check lang item.

PanicInfo

The panic_info lang item.

PanicLocation

The panic_location lang item.

PanicImpl

The panic_impl lang item.

PanicNoUnwind

The panic_no_unwind lang item.

BeginPanic

The begin_panic lang item.

libstd panic entry point. Necessary for const eval to be able to catch it

ExchangeMalloc

The exchange_malloc lang item.

BoxFree

The box_free lang item.

DropInPlace

The drop_in_place lang item.

Oom

The oom lang item.

AllocLayout

The alloc_layout lang item.

Start

The start lang item.

EhPersonality

The eh_personality lang item.

EhCatchTypeinfo

The eh_catch_typeinfo lang item.

OwnedBox

The owned_box lang item.

PhantomData

The phantom_data lang item.

ManuallyDrop

The manually_drop lang item.

MaybeUninit

The maybe_uninit lang item.

AlignOffset

The align_offset lang item.

Align offset for stride != 1; must not panic.

Termination

The termination lang item.

Try

The Try lang item.

Tuple

The tuple_trait lang item.

SliceLen

The slice_len_fn lang item.

TryTraitFromResidual

The from_residual lang item.

TryTraitFromOutput

The from_output lang item.

TryTraitBranch

The branch lang item.

TryTraitFromYeet

The from_yeet lang item.

PollReady

The Ready lang item.

PollPending

The Pending lang item.

FromGenerator

The from_generator lang item.

GetContext

The get_context lang item.

FuturePoll

The poll lang item.

FromFrom

The from lang item.

OptionSome

The Some lang item.

OptionNone

The None lang item.

ResultOk

The Ok lang item.

ResultErr

The Err lang item.

ControlFlowContinue

The Continue lang item.

ControlFlowBreak

The Break lang item.

IntoFutureIntoFuture

The into_future lang item.

IntoIterIntoIter

The into_iter lang item.

IteratorNext

The next lang item.

PinNewUnchecked

The new_unchecked lang item.

RangeFrom

The RangeFrom lang item.

RangeFull

The RangeFull lang item.

RangeInclusiveStruct

The RangeInclusive lang item.

RangeInclusiveNew

The range_inclusive_new lang item.

Range

The Range lang item.

RangeToInclusive

The RangeToInclusive lang item.

RangeTo

The RangeTo lang item.

Implementations

Returns the name symbol in #[lang = "$name"]. For example, LangItem::PartialEq.name() would result in sym::eq since it is #[lang = "eq"].

The group that this lang item belongs to, or None if it doesn’t belong to a group.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 1 byte

Size for each variant:

  • Sized: 0 bytes
  • Unsize: 0 bytes
  • StructuralPeq: 0 bytes
  • StructuralTeq: 0 bytes
  • Copy: 0 bytes
  • Clone: 0 bytes
  • Sync: 0 bytes
  • DiscriminantKind: 0 bytes
  • Discriminant: 0 bytes
  • PointeeTrait: 0 bytes
  • Metadata: 0 bytes
  • DynMetadata: 0 bytes
  • Freeze: 0 bytes
  • Drop: 0 bytes
  • Destruct: 0 bytes
  • CoerceUnsized: 0 bytes
  • DispatchFromDyn: 0 bytes
  • TransmuteOpts: 0 bytes
  • TransmuteTrait: 0 bytes
  • Add: 0 bytes
  • Sub: 0 bytes
  • Mul: 0 bytes
  • Div: 0 bytes
  • Rem: 0 bytes
  • Neg: 0 bytes
  • Not: 0 bytes
  • BitXor: 0 bytes
  • BitAnd: 0 bytes
  • BitOr: 0 bytes
  • Shl: 0 bytes
  • Shr: 0 bytes
  • AddAssign: 0 bytes
  • SubAssign: 0 bytes
  • MulAssign: 0 bytes
  • DivAssign: 0 bytes
  • RemAssign: 0 bytes
  • BitXorAssign: 0 bytes
  • BitAndAssign: 0 bytes
  • BitOrAssign: 0 bytes
  • ShlAssign: 0 bytes
  • ShrAssign: 0 bytes
  • Index: 0 bytes
  • IndexMut: 0 bytes
  • UnsafeCell: 0 bytes
  • VaList: 0 bytes
  • Deref: 0 bytes
  • DerefMut: 0 bytes
  • DerefTarget: 0 bytes
  • Receiver: 0 bytes
  • Fn: 0 bytes
  • FnMut: 0 bytes
  • FnOnce: 0 bytes
  • FnOnceOutput: 0 bytes
  • Future: 0 bytes
  • GeneratorState: 0 bytes
  • Generator: 0 bytes
  • Unpin: 0 bytes
  • Pin: 0 bytes
  • PartialEq: 0 bytes
  • PartialOrd: 0 bytes
  • Panic: 0 bytes
  • PanicFmt: 0 bytes
  • PanicDisplay: 0 bytes
  • ConstPanicFmt: 0 bytes
  • PanicBoundsCheck: 0 bytes
  • PanicInfo: 0 bytes
  • PanicLocation: 0 bytes
  • PanicImpl: 0 bytes
  • PanicNoUnwind: 0 bytes
  • BeginPanic: 0 bytes
  • ExchangeMalloc: 0 bytes
  • BoxFree: 0 bytes
  • DropInPlace: 0 bytes
  • Oom: 0 bytes
  • AllocLayout: 0 bytes
  • Start: 0 bytes
  • EhPersonality: 0 bytes
  • EhCatchTypeinfo: 0 bytes
  • OwnedBox: 0 bytes
  • PhantomData: 0 bytes
  • ManuallyDrop: 0 bytes
  • MaybeUninit: 0 bytes
  • AlignOffset: 0 bytes
  • Termination: 0 bytes
  • Try: 0 bytes
  • Tuple: 0 bytes
  • SliceLen: 0 bytes
  • TryTraitFromResidual: 0 bytes
  • TryTraitFromOutput: 0 bytes
  • TryTraitBranch: 0 bytes
  • TryTraitFromYeet: 0 bytes
  • PollReady: 0 bytes
  • PollPending: 0 bytes
  • FromGenerator: 0 bytes
  • GetContext: 0 bytes
  • FuturePoll: 0 bytes
  • FromFrom: 0 bytes
  • OptionSome: 0 bytes
  • OptionNone: 0 bytes
  • ResultOk: 0 bytes
  • ResultErr: 0 bytes
  • ControlFlowContinue: 0 bytes
  • ControlFlowBreak: 0 bytes
  • IntoFutureIntoFuture: 0 bytes
  • IntoIterIntoIter: 0 bytes
  • IteratorNext: 0 bytes
  • PinNewUnchecked: 0 bytes
  • RangeFrom: 0 bytes
  • RangeFull: 0 bytes
  • RangeInclusiveStruct: 0 bytes
  • RangeInclusiveNew: 0 bytes
  • Range: 0 bytes
  • RangeToInclusive: 0 bytes
  • RangeTo: 0 bytes