pub struct Library {
pub namespaces: Vec<Namespace>,
pub index: HashMap<String, u16>,
}
Fields§
§namespaces: Vec<Namespace>
§index: HashMap<String, u16>
Implementations§
source§impl Library
impl Library
pub fn new(main_namespace_name: &str) -> Self
pub fn show_non_bound_types(&self, env: &Env)
pub fn namespace(&self, ns_id: u16) -> &Namespace
pub fn namespace_mut(&mut self, ns_id: u16) -> &mut Namespace
pub fn find_namespace(&self, name: &str) -> Option<u16>
pub fn add_namespace(&mut self, name: &str) -> u16
pub fn add_constant(&mut self, ns_id: u16, c: Constant)
pub fn add_function(&mut self, ns_id: u16, f: Function)
pub fn add_type(&mut self, ns_id: u16, name: &str, typ: Type) -> TypeId
pub fn find_type(&self, current_ns_id: u16, name: &str) -> Option<TypeId>
pub fn find_or_stub_type(&mut self, current_ns_id: u16, name: &str) -> TypeId
pub fn type_(&self, tid: TypeId) -> &Type
pub fn type_mut(&mut self, tid: TypeId) -> &mut Type
pub fn register_version(&mut self, ns_id: u16, version: Version)
pub fn types<'a>(&'a self) -> Box<dyn Iterator<Item = (TypeId, &'a Type)> + 'a>
sourcepub fn namespace_types<'a>(
&'a self,
ns_id: u16,
) -> Box<dyn Iterator<Item = (TypeId, &'a Type)> + 'a>
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.
pub fn is_crate(&self, crate_name: &str) -> bool
pub fn is_glib_crate(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnwindSafe for Library
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