Struct VtfLib

Source
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

Source

pub fn initialize() -> Option<(Self, VtfGuard)>

Initialize the library. Returns None if it’s already initialized. Uninitialization happens when both returned structs are dropped.

Source

pub fn get_version() -> u32

Get the library’s version number.

Source

pub fn get_version_string() -> &'static str

Get the library’s version number string.

Source

pub fn get_integer(&self, option: IntegerOption) -> i32

Get the value of an integer configuration option.

Source

pub fn set_integer(&self, option: IntegerOption, value: i32)

Set the value of an integer configuration option.

Source

pub fn get_float(&self, option: FloatOption) -> f32

Get the value of a floating point configuration option.

Source

pub fn set_float(&self, option: FloatOption, value: f32)

Set the value of a floating point configuration option.

Source

pub fn new_vtf_file(&self) -> VtfFile<'_>

Create a vtf file. The VtfFile needs to be bound before it can be worked on.

§Panics

Panics if the vtf creation fails. This should not happen.

Trait Implementations§

Source§

impl Debug for VtfLib

Source§

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

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

impl Drop for VtfLib

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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