pub struct TraitInfo {
pub name: String,
pub docs: Option<String>,
pub module_path: Option<String>,
pub visibility: Visibility,
pub generics: Vec<String>,
pub supertraits: Vec<String>,
pub associated_types: Vec<AssociatedType>,
pub methods: Vec<MethodInfo>,
pub source_file: Option<String>,
pub source_line: Option<u32>,
pub feature_flags: Vec<String>,
}Expand description
Rich description of a Rust trait definition.
This is the shape consumed by
crate::trait_explorer::graph_visualization::graph_generator::TraitGraphGenerator
when building a crate::trait_explorer::graph_visualization::TraitGraph
from source-level trait information.
Fields§
§name: StringName of the trait (e.g. "Estimator").
docs: Option<String>Rustdoc documentation attached to the trait, if any.
module_path: Option<String>Module path the trait is declared in (e.g. "sklears_core::traits").
visibility: VisibilityVisibility of the trait declaration.
generics: Vec<String>Generic parameters declared on the trait, e.g. ["T: Clone + Send"].
supertraits: Vec<String>Names of the supertraits this trait requires.
associated_types: Vec<AssociatedType>Associated types declared by the trait.
methods: Vec<MethodInfo>Methods declared by the trait (required and provided).
source_file: Option<String>Source file the trait is declared in, if known.
source_line: Option<u32>Line number of the trait declaration within source_file, if known.
feature_flags: Vec<String>Cargo feature flags that must be enabled for this trait to be
available (e.g. ["experimental"]).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraitInfo
impl RefUnwindSafe for TraitInfo
impl Send for TraitInfo
impl Sync for TraitInfo
impl Unpin for TraitInfo
impl UnsafeUnpin for TraitInfo
impl UnwindSafe for TraitInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more