pub struct CapeTypeLibraries {
pub(crate) interface: *mut ICapeLibraryEnumerator,
}Expand description
Enumerator for all registered type libraries.
This is used to get the details of each library by name or UUID, or to get all libraries.
Fields§
§interface: *mut ICapeLibraryEnumeratorImplementations§
Source§impl CapeTypeLibraries
impl CapeTypeLibraries
Sourcepub fn new() -> Result<CapeTypeLibraries, COBIAError>
pub fn new() -> Result<CapeTypeLibraries, COBIAError>
Create a new library enumerator.
§Examples
use cobia;
use cobia::prelude::*;
cobia::cape_open_initialize().unwrap();
let library_enumerator = cobia::CapeTypeLibraries::new().unwrap();
//...
cobia::cape_open_cleanup();Sourcepub fn get_library_by_library_id(
&self,
library_id: &CapeUUID,
) -> Result<CapeLibraryDetails, COBIAError>
pub fn get_library_by_library_id( &self, library_id: &CapeUUID, ) -> Result<CapeLibraryDetails, COBIAError>
Get the library details by library UUID.
Get the details of a library by its UUID.
§Examples
use cobia;
use cobia::prelude::*;
use cobia::cape_open_1_2;
cobia::cape_open_initialize().unwrap();
let library_enumerator = cobia::CapeTypeLibraries::new().unwrap();
let library_details = library_enumerator.get_library_by_library_id(&cape_open_1_2::LIBRARY_ID).unwrap();
assert_eq!(library_details.get_name().unwrap(),"CAPEOPEN_1_2");
cobia::cape_open_cleanup();Sourcepub fn get_library_by_name(
&self,
lib_name: &str,
) -> Result<CapeLibraryDetails, COBIAError>
pub fn get_library_by_name( &self, lib_name: &str, ) -> Result<CapeLibraryDetails, COBIAError>
Get the library details by library name.
Get the details of a library by its name.
§Examples
use cobia;
use cobia::prelude::*;
use cobia::cape_open_1_2;
cobia::cape_open_initialize().unwrap();
let library_enumerator = cobia::CapeTypeLibraries::new().unwrap();
let library_details = library_enumerator.get_library_by_name("CAPEOPEN_1_2").unwrap();
assert_eq!(library_details.get_name().unwrap(),"CAPEOPEN_1_2");
cobia::cape_open_cleanup();Sourcepub fn get_library_by_interface_id(
&self,
interface_id: &CapeUUID,
) -> Result<CapeLibraryDetails, COBIAError>
pub fn get_library_by_interface_id( &self, interface_id: &CapeUUID, ) -> Result<CapeLibraryDetails, COBIAError>
Get the library details by interface id.
Get the details of a library the interface id of any contained interface.
§Examples
use cobia;
use cobia::prelude::*;
use cobia::cape_open_1_2;
cobia::cape_open_initialize().unwrap();
let library_enumerator = cobia::CapeTypeLibraries::new().unwrap();
let library_details = library_enumerator.get_library_by_interface_id(&cape_open_1_2::ICAPEIDENTIFICATION_UUID).unwrap();
assert_eq!(library_details.get_name().unwrap(),"CAPEOPEN_1_2");
cobia::cape_open_cleanup();Sourcepub fn libraries(
&self,
) -> Result<CobiaCollection<CapeLibraryDetails>, COBIAError>
pub fn libraries( &self, ) -> Result<CobiaCollection<CapeLibraryDetails>, COBIAError>
Get all type libraries.
Get a collection of all registered type libraries.
§Examples
use cobia;
use cobia::prelude::*;
cobia::cape_open_initialize().unwrap();
let library_enumerator = cobia::CapeTypeLibraries::new().unwrap();
let libraries = library_enumerator.libraries().unwrap();
assert!(libraries.size() > 0); //normally the CAPE-OPEN type libraries are registered
cobia::cape_open_cleanup();Trait Implementations§
Source§impl Clone for CapeTypeLibraries
Add pointer reference
impl Clone for CapeTypeLibraries
Add pointer reference
ICapeTypeLibraries derives from ICobiaBase, which contains addReference() and release(). The Clone trait calls addReference.
Auto Trait Implementations§
impl Freeze for CapeTypeLibraries
impl RefUnwindSafe for CapeTypeLibraries
impl !Send for CapeTypeLibraries
impl !Sync for CapeTypeLibraries
impl Unpin for CapeTypeLibraries
impl UnwindSafe for CapeTypeLibraries
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