pub struct Info {Show 22 fields
pub base: InfoBase,
pub c_type: String,
pub c_class_type: Option<String>,
pub get_type: String,
pub is_interface: bool,
pub is_fundamental: bool,
pub supertypes: Vec<StatusedTypeId>,
pub final_type: bool,
pub generate_trait: bool,
pub trait_name: String,
pub has_constructors: bool,
pub has_functions: bool,
pub virtual_methods: Vec<Info>,
pub signals: Vec<Info>,
pub notify_signals: Vec<Info>,
pub properties: Vec<Property>,
pub builder_properties: Vec<(Vec<Property>, TypeId)>,
pub builder_postprocess: Option<String>,
pub child_properties: ChildProperties,
pub signatures: Signatures,
pub ref_fn: Option<String>,
pub unref_fn: Option<String>,
}
Fields§
§base: InfoBase
§c_type: String
§c_class_type: Option<String>
§get_type: String
§is_interface: bool
§is_fundamental: bool
§supertypes: Vec<StatusedTypeId>
§final_type: bool
§generate_trait: bool
§trait_name: String
§has_constructors: bool
§has_functions: bool
§virtual_methods: Vec<Info>
§signals: Vec<Info>
§notify_signals: Vec<Info>
§properties: Vec<Property>
§builder_properties: Vec<(Vec<Property>, TypeId)>
§builder_postprocess: Option<String>
§child_properties: ChildProperties
§signatures: Signatures
§ref_fn: Option<String>
Specific to fundamental types
unref_fn: Option<String>
Specific to fundamental types
Implementations§
source§impl Info
impl Info
pub fn has_signals(&self) -> bool
sourcepub fn should_generate_impl_block(&self) -> bool
pub fn should_generate_impl_block(&self) -> bool
Whether we should generate an impl block for this object We don’t generate an impl block if the type doesn’t have any of the followings:
- Constructors / Functions / Builder properties (no build function)
- Is a final type & doesn’t have either methods / properties / child properties / signals
pub fn need_generate_inherent(&self) -> bool
pub fn need_generate_trait(&self) -> bool
pub fn has_action_signals(&self) -> bool
sourcepub fn function_location(&self, fn_info: &Info) -> LocationInObject
pub fn function_location(&self, fn_info: &Info) -> LocationInObject
Returns the location of the function within this object
sourcepub fn generate_doc_link_info(
&self,
fn_info: &Info,
) -> (Cow<'_, str>, Cow<'_, str>)
pub fn generate_doc_link_info( &self, fn_info: &Info, ) -> (Cow<'_, str>, Cow<'_, str>)
Generate doc name based on function location within this object
See also Self::function_location()
.
Returns (item/crate path including type name, just the type name)
Methods from Deref<Target = InfoBase>§
sourcepub fn constructors(&self) -> Vec<&Info>
pub fn constructors(&self) -> Vec<&Info>
TODO: return iterator
pub fn methods(&self) -> Vec<&Info>
pub fn functions(&self) -> Vec<&Info>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Info
impl RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl UnwindSafe for Info
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