pub struct VtfLib(/* private fields */);
Expand description
Represents initialized library.
Only one of these can exist at any given time.
This struct is !Send + !Sync
since the library is not thread-safe.
Implementations§
Source§impl VtfLib
impl VtfLib
Sourcepub fn initialize() -> Option<(Self, VtfGuard)>
pub fn initialize() -> Option<(Self, VtfGuard)>
Initialize the library.
Returns None
if it’s already initialized.
Uninitialization happens when both returned structs are dropped.
Sourcepub fn get_version() -> u32
pub fn get_version() -> u32
Get the library’s version number.
Sourcepub fn get_version_string() -> &'static str
pub fn get_version_string() -> &'static str
Get the library’s version number string.
Sourcepub fn get_integer(&self, option: IntegerOption) -> i32
pub fn get_integer(&self, option: IntegerOption) -> i32
Get the value of an integer configuration option.
Sourcepub fn set_integer(&self, option: IntegerOption, value: i32)
pub fn set_integer(&self, option: IntegerOption, value: i32)
Set the value of an integer configuration option.
Sourcepub fn get_float(&self, option: FloatOption) -> f32
pub fn get_float(&self, option: FloatOption) -> f32
Get the value of a floating point configuration option.
Sourcepub fn set_float(&self, option: FloatOption, value: f32)
pub fn set_float(&self, option: FloatOption, value: f32)
Set the value of a floating point configuration option.
Sourcepub fn new_vtf_file(&self) -> VtfFile<'_>
pub fn new_vtf_file(&self) -> VtfFile<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VtfLib
impl RefUnwindSafe for VtfLib
impl !Send for VtfLib
impl !Sync for VtfLib
impl Unpin for VtfLib
impl UnwindSafe for VtfLib
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