Struct rustdoc::clean::types::Typedef [−][src]
pub(crate) struct Typedef {
pub(crate) type_: Type,
pub(crate) generics: Generics,
pub(crate) item_type: Option<Type>,
}
Fields
type_: Type
generics: Generics
item_type: Option<Type>
type_
can come from either the HIR or from metadata. If it comes from HIR, it may be a type
alias instead of the final type. This will always have the final type, regardless of whether
type_
came from HIR or from metadata.
If item_type.is_none()
, type_
is guarenteed to come from metadata (and therefore hold the
final type).
Trait Implementations
Use this method to get the DefId
of a clean
AST node.
This will return None
when called on a primitive clean::Type
.
Use Self::def_id_full
if you want to include primitives. Read more
Use this method to get the DefId of a clean AST node, including PrimitiveTypes. Read more
Auto Trait Implementations
impl RefUnwindSafe for Typedef
impl UnwindSafe for Typedef
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
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: 192 bytes