Enum rustdoc_types::Type
source · pub enum Type {
Show 13 variants
ResolvedPath(Path),
DynTrait(DynTrait),
Generic(String),
Primitive(String),
FunctionPointer(Box<FunctionPointer>),
Tuple(Vec<Type>),
Slice(Box<Type>),
Array {
type_: Box<Type>,
len: String,
},
ImplTrait(Vec<GenericBound>),
Infer,
RawPointer {
mutable: bool,
type_: Box<Type>,
},
BorrowedRef {
lifetime: Option<String>,
mutable: bool,
type_: Box<Type>,
},
QualifiedPath {
name: String,
args: Box<GenericArgs>,
self_type: Box<Type>,
trait_: Path,
},
}
Variants§
ResolvedPath(Path)
Structs, enums, and unions
DynTrait(DynTrait)
Generic(String)
Parameterized types
Primitive(String)
Built in numberic (i*, u*, f*) types, bool, and char
FunctionPointer(Box<FunctionPointer>)
extern "ABI" fn
Tuple(Vec<Type>)
(String, u32, Box<usize>)
Slice(Box<Type>)
[u32]
Array
[u32; 15]
ImplTrait(Vec<GenericBound>)
impl TraitA + TraitB + ...
Infer
_
RawPointer
*mut u32
, *u8
, etc.
BorrowedRef
&'a mut String
, &str
, etc.
QualifiedPath
<Type as Trait>::Name
or associated types like T::Item
where T: Iterator
Trait Implementations§
source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more