pub struct TypeReflection {
pub kind: TypeKind,
pub inferred: bool,
pub span: Span,
}Expand description
Represents a reflection of a type in the codebase.
This structure provides metadata about a type, including its kind (e.g., string, integer), whether it was inferred, and its location in the source code.
Fields§
§kind: TypeKindThe kind of the type (e.g., string, integer).
inferred: boolWhether the type was inferred or explicitly declared.
span: SpanThe span of the type in the source code.
Trait Implementations§
Source§impl Clone for TypeReflection
impl Clone for TypeReflection
Source§fn clone(&self) -> TypeReflection
fn clone(&self) -> TypeReflection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeReflection
impl Debug for TypeReflection
Source§impl<'de> Deserialize<'de> for TypeReflection
impl<'de> Deserialize<'de> for TypeReflection
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
Source§impl HasSource for TypeReflection
impl HasSource for TypeReflection
Source§fn source(&self) -> SourceIdentifier
fn source(&self) -> SourceIdentifier
Returns the source identifier of the file containing this type.
The source identifier provides metadata about the origin of the file, such as whether it is user-defined, vendor-provided, or built-in.
Source§impl HasSpan for TypeReflection
impl HasSpan for TypeReflection
Source§impl Hash for TypeReflection
impl Hash for TypeReflection
Source§impl Ord for TypeReflection
impl Ord for TypeReflection
Source§fn cmp(&self, other: &TypeReflection) -> Ordering
fn cmp(&self, other: &TypeReflection) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TypeReflection
impl PartialEq for TypeReflection
Source§impl PartialOrd for TypeReflection
impl PartialOrd for TypeReflection
Source§impl Serialize for TypeReflection
impl Serialize for TypeReflection
impl Eq for TypeReflection
impl StructuralPartialEq for TypeReflection
Auto Trait Implementations§
impl Freeze for TypeReflection
impl RefUnwindSafe for TypeReflection
impl Send for TypeReflection
impl Sync for TypeReflection
impl Unpin for TypeReflection
impl UnwindSafe for TypeReflection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more