Struct libgir::analysis::object::Info

source ·
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

source

pub fn has_signals(&self) -> bool

source

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
source

pub fn need_generate_inherent(&self) -> bool

source

pub fn need_generate_trait(&self) -> bool

source

pub fn has_action_signals(&self) -> bool

source

pub fn function_location(&self, fn_info: &Info) -> LocationInObject

Returns the location of the function within this object

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>§

source

pub fn constructors(&self) -> Vec<&Info>

TODO: return iterator

source

pub fn methods(&self) -> Vec<&Info>

source

pub fn functions(&self) -> Vec<&Info>

Trait Implementations§

source§

impl Debug for Info

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Info

source§

fn default() -> Info

Returns the “default value” for a type. Read more
source§

impl Deref for Info

source§

type Target = InfoBase

The resulting type after dereferencing.
source§

fn deref(&self) -> &InfoBase

Dereferences the value.

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.