Struct libgir::library::Library

source ·
pub struct Library {
    pub namespaces: Vec<Namespace>,
    pub index: HashMap<String, u16>,
}

Fields§

§namespaces: Vec<Namespace>§index: HashMap<String, u16>

Implementations§

source§

impl Library

source

pub fn add_glib_priority(&mut self, work_mode: WorkMode)

source§

impl Library

source

pub fn new(main_namespace_name: &str) -> Self

source

pub fn show_non_bound_types(&self, env: &Env)

source

pub fn namespace(&self, ns_id: u16) -> &Namespace

source

pub fn namespace_mut(&mut self, ns_id: u16) -> &mut Namespace

source

pub fn find_namespace(&self, name: &str) -> Option<u16>

source

pub fn add_namespace(&mut self, name: &str) -> u16

source

pub fn add_constant(&mut self, ns_id: u16, c: Constant)

source

pub fn add_function(&mut self, ns_id: u16, f: Function)

source

pub fn add_type(&mut self, ns_id: u16, name: &str, typ: Type) -> TypeId

source

pub fn find_type(&self, current_ns_id: u16, name: &str) -> Option<TypeId>

source

pub fn find_or_stub_type(&mut self, current_ns_id: u16, name: &str) -> TypeId

source

pub fn type_(&self, tid: TypeId) -> &Type

source

pub fn type_mut(&mut self, tid: TypeId) -> &mut Type

source

pub fn register_version(&mut self, ns_id: u16, version: Version)

source

pub fn types<'a>(&'a self) -> Box<dyn Iterator<Item = (TypeId, &'a Type)> + 'a>

source

pub fn namespace_types<'a>( &'a self, ns_id: u16, ) -> Box<dyn Iterator<Item = (TypeId, &'a Type)> + 'a>

Types from a single namespace in alphabetical order.

source

pub fn is_crate(&self, crate_name: &str) -> bool

source

pub fn is_glib_crate(&self) -> bool

source§

impl Library

source

pub fn postprocessing(&mut self, config: &Config)

source§

impl Library

source

pub fn preprocessing(&mut self, work_mode: WorkMode)

source§

impl Library

source

pub fn read_file<P: AsRef<Path>>( &mut self, dirs: &[P], libs: &mut Vec<String>, ) -> Result<(), String>

Trait Implementations§

source§

impl Debug for Library

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.