pub(crate) enum ItemType {
Show 26 variants
Module,
ExternCrate,
Import,
Struct,
Enum,
Function,
Typedef,
Static,
Trait,
Impl,
TyMethod,
Method,
StructField,
Variant,
Macro,
Primitive,
AssocType,
Constant,
AssocConst,
Union,
ForeignType,
Keyword,
OpaqueTy,
ProcAttribute,
ProcDerive,
TraitAlias,
}
Expand description
Item type. Corresponds to clean::ItemEnum
variants.
The search index uses item types encoded as smaller numbers which equal to
discriminants. JavaScript then is used to decode them into the original value.
Consequently, every change to this type should be synchronized to
the itemTypes
mapping table in html/static/js/search.js
.
In addition, code in html::render
uses this enum to generate CSS classes, page prefixes, and
module headings. If you are adding to this enum and want to ensure that the sidebar also prints
a heading, edit the listing in html/render.rs
, function sidebar_module
. This uses an
ordering based on a helper function inside item_module
, in the same file.
Variants
Module
ExternCrate
Import
Struct
Enum
Function
Typedef
Static
Trait
Impl
TyMethod
Method
StructField
Variant
Macro
Primitive
AssocType
Constant
AssocConst
Union
ForeignType
Keyword
OpaqueTy
ProcAttribute
ProcDerive
TraitAlias
Implementations
Trait Implementations
sourceimpl FromWithTcx<ItemType> for ItemKind
impl FromWithTcx<ItemType> for ItemKind
sourceimpl Ord for ItemType
impl Ord for ItemType
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialOrd<ItemType> for ItemType
impl PartialOrd<ItemType> for ItemType
sourcefn partial_cmp(&self, other: &ItemType) -> Option<Ordering>
fn partial_cmp(&self, other: &ItemType) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ItemType
impl Eq for ItemType
impl StructuralEq for ItemType
impl StructuralPartialEq for ItemType
Auto Trait Implementations
impl RefUnwindSafe for ItemType
impl Send for ItemType
impl Sync for ItemType
impl Unpin for ItemType
impl UnwindSafe for ItemType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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:
Module
: 0 bytesExternCrate
: 0 bytesImport
: 0 bytesStruct
: 0 bytesEnum
: 0 bytesFunction
: 0 bytesTypedef
: 0 bytesStatic
: 0 bytesTrait
: 0 bytesImpl
: 0 bytesTyMethod
: 0 bytesMethod
: 0 bytesStructField
: 0 bytesVariant
: 0 bytesMacro
: 0 bytesPrimitive
: 0 bytesAssocType
: 0 bytesConstant
: 0 bytesAssocConst
: 0 bytesUnion
: 0 bytesForeignType
: 0 bytesKeyword
: 0 bytesOpaqueTy
: 0 bytesProcAttribute
: 0 bytesProcDerive
: 0 bytesTraitAlias
: 0 bytes