pub struct RustCodeFeatures {
pub signature: Option<String>,
pub return_type: Option<String>,
pub param_types: Vec<String>,
pub visibility: String,
pub is_async: bool,
pub is_generic: bool,
pub trait_bounds: Vec<String>,
pub attributes: Vec<String>,
pub item_kind: String,
}Expand description
Structural features extracted from Rust source code via regex parsing.
Fields§
§signature: Option<String>Function/type/impl signature.
return_type: Option<String>Return type.
param_types: Vec<String>Parameter types.
visibility: StringVisibility (pub, pub(crate), private).
is_async: boolWhether it is async.
is_generic: boolWhether it is generic.
trait_bounds: Vec<String>Trait bounds.
attributes: Vec<String>Attributes (#test, #[cfg(…)], etc.)
item_kind: StringItem kind (fn, struct, enum, impl, trait, mod).
Trait Implementations§
Source§impl Clone for RustCodeFeatures
impl Clone for RustCodeFeatures
Source§fn clone(&self) -> RustCodeFeatures
fn clone(&self) -> RustCodeFeatures
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 RustCodeFeatures
impl Debug for RustCodeFeatures
Source§impl Default for RustCodeFeatures
impl Default for RustCodeFeatures
Source§fn default() -> RustCodeFeatures
fn default() -> RustCodeFeatures
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RustCodeFeatures
impl<'de> Deserialize<'de> for RustCodeFeatures
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
Auto Trait Implementations§
impl Freeze for RustCodeFeatures
impl RefUnwindSafe for RustCodeFeatures
impl Send for RustCodeFeatures
impl Sync for RustCodeFeatures
impl Unpin for RustCodeFeatures
impl UnsafeUnpin for RustCodeFeatures
impl UnwindSafe for RustCodeFeatures
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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