[−][src]Enum rustdoc::clean::types::Type
A representation of a type suitable for hyperlinking purposes. Ideally, one can get the original
type out of the AST/TyCtxt given one of these, if more information is needed. Most
importantly, it does not preserve mutability or boxes.
Variants
Structs/enums/traits (most that would be an hir::TyKind::Path).
Fields of ResolvedPath
Generic(String)For parameterized types, so the consumer of the JSON don't go looking for types which don't exist anywhere.
Primitive(PrimitiveType)Primitives are the fixed-size numeric types (plus int/usize/float), char, arrays, slices, and tuples.
BareFunction(Box<BareFunctionDecl>)extern "ABI" fn
RawPointer(Mutability, Box<Type>)Fields of BorrowedRef
ImplTrait(Vec<GenericBound>)Implementations
impl Type[src]
pub(crate) fn primitive_type(&self) -> Option<PrimitiveType>[src]
pub(crate) fn is_generic(&self) -> bool[src]
pub(crate) fn is_self_type(&self) -> bool[src]
pub(crate) fn generics(&self) -> Option<Vec<Type>>[src]
pub(crate) fn bindings(&self) -> Option<&[TypeBinding]>[src]
pub(crate) fn is_full_generic(&self) -> bool[src]
pub(crate) fn projection(&self) -> Option<(&Type, DefId, &str)>[src]
impl Type[src]
Trait Implementations
impl<'_, '_> Clean<Type> for (TraitRef<'_>, &'_ [TypeBinding])[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Type[src]
impl<'tcx> Clean<Type> for ProjectionTy<'tcx>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Type[src]
impl<'_> Clean<Type> for TraitRef<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Type[src]
impl<'_> Clean<Type> for Ty<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Type[src]
impl<'tcx> Clean<Type> for Ty<'tcx>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Type[src]
impl Clone for Type[src]
impl Debug for Type[src]
impl Eq for Type[src]
impl GetDefId for Type[src]
impl Hash for Type[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<Type> for Type[src]
impl StructuralEq for Type[src]
impl StructuralPartialEq for Type[src]
Auto Trait Implementations
impl !RefUnwindSafe for Type
impl !Send for Type
impl !Sync for Type
impl Unpin for Type
impl !UnwindSafe for Type
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,