Enum rustdoc::clean::types::ConstantKind [−][src]
Variants
This is the wrapper around ty::Const for a non-local constant. Because it doesn’t have a
BodyId, we need to handle it on its own.
Note that ty::Const includes generic parameters, and may not always be uniquely identified
by a DefId. So this field must be different from Extern.
Fields of TyConst
expr: StringA constant (expression) that’s not an item or associated item. These are usually found nested inside types (e.g., array lengths) or expressions (e.g., repeat counts), and also used to define explicit discriminant values for enum variants.
Fields of Anonymous
body: BodyIdA constant from a different crate.
Fields of Extern
def_id: DefIdconst FOO: u32 = ...;
Trait Implementations
impl Clone for ConstantKind[src]
fn clone(&self) -> ConstantKind[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for ConstantKind[src]
impl Eq for ConstantKind[src]
impl Hash for ConstantKind[src]
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<ConstantKind> for ConstantKind[src]
fn eq(&self, other: &ConstantKind) -> bool[src]
fn ne(&self, other: &ConstantKind) -> bool[src]
impl StructuralEq for ConstantKind[src]
impl StructuralPartialEq for ConstantKind[src]
Auto Trait Implementations
impl RefUnwindSafe for ConstantKind
impl Send for ConstantKind
impl Sync for ConstantKind
impl Unpin for ConstantKind
impl UnwindSafe for ConstantKind
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<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[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>,