pub struct ComponentHint {
pub name: &'static RustIdent,
pub ty: TypeHint,
pub doc: Option<&'static str>,
}Expand description
A description of a statically known field of the type: object.field.
The field could be an object of a particular type or an object’s method available for invocation.
Fields§
§name: &'static RustIdentThe name of the field.
ty: TypeHintThe type of the field.
In the case of methods, the TypeHint is usually TypeHint::Invocation, which describes the invocation signature of the method.
doc: Option<&'static str>The relevant RustDoc documentation for the field.
This documentation pertains to the field itself and is (usually) different from the documentation found in the TypeHint::doc of the field’s type description.
use ad_astra::export;
#[export]
struct Foo {
/// A ComponentHint's documentation.
pub field: usize,
}
#[export]
impl Foo {
/// A ComponentHint's documentation.
pub fn method(&self) {}
}Trait Implementations§
Source§impl Clone for ComponentHint
impl Clone for ComponentHint
Source§fn clone(&self) -> ComponentHint
fn clone(&self) -> ComponentHint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ComponentHint
Source§impl Debug for ComponentHint
impl Debug for ComponentHint
Source§impl Display for ComponentHint
impl Display for ComponentHint
impl Eq for ComponentHint
Source§impl Ord for ComponentHint
impl Ord for ComponentHint
1.21.0 (const: unstable) · 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 ComponentHint
impl PartialEq for ComponentHint
Source§fn eq(&self, other: &ComponentHint) -> bool
fn eq(&self, other: &ComponentHint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ComponentHint
impl PartialOrd for ComponentHint
impl StructuralPartialEq for ComponentHint
Auto Trait Implementations§
impl Freeze for ComponentHint
impl RefUnwindSafe for ComponentHint
impl Send for ComponentHint
impl Sync for ComponentHint
impl Unpin for ComponentHint
impl UnsafeUnpin for ComponentHint
impl UnwindSafe for ComponentHint
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
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,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more