Struct emf_core_base_rs::CBase[][src]

pub struct CBase<'interface> { /* fields omitted */ }

Owned emf-core-base interface.

Implementations

impl<'interface> CBase<'interface>[src]

pub unsafe fn new(interface: CBaseRef<'interface>) -> Self[src]

Constructs itself using the borrowed interface.

Safety

This function is unsafe, as it enables bypassing the locking mechanism.

Trait Implementations

impl<'interface> CBaseAPILoader<'interface> for CBase<'interface>[src]

type Interface = Self

Type of the interface.

unsafe fn fetch_interface(
    base_module: Option<NonNull<CBaseFFI>>,
    get_function_fn: GetFunctionFnFFI
) -> Self::Interface
[src]

Fetches the emf-core-base interface. Read more

impl<'interface> CBaseAccess<'interface> for CBase<'interface>[src]

type Interface = CBaseRef<'interface>

Type of the interface.

fn lock<U>(&self, f: impl FnOnce(&mut Self::Interface) -> U) -> U[src]

Enters the critical section with the provided function. Read more

fn try_lock<U>(&self, f: impl FnOnce(&mut Self::Interface) -> U) -> Option<U>[src]

Enters the critical section with the provided function. Read more

unsafe fn assume_locked<U>(
    &self,
    f: impl FnOnce(&mut Self::Interface) -> U
) -> U
[src]

Enters the critical section with the provided function without locking. Read more

impl<'interface> CBaseInterfaceInfo for CBase<'interface>[src]

type Interface = <CBaseRef<'interface> as CBaseInterfaceInfo>::Interface

Type of the interface.

fn interface_version(&self) -> Version[src]

Returns the version of the interface.

fn internal_interface(&self) -> &Self::Interface[src]

Fetches the internal low-level interface.

impl<'interface> Debug for CBase<'interface>[src]

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

Formats the value using the given formatter. Read more

impl<'interface> SysAPIMin<'interface> for CBase<'interface>[src]

fn panic(&self, error: Option<impl AsRef<CStr>>) -> ![src]

Execution of the program is stopped abruptly. The error may be logged.

fn has_function<U>(&self) -> bool where
    U: FnCaster
[src]

Checks if a function is implemented. Read more

fn get_function<U>(&self, caster: &U) -> Option<<U as FnCaster>::Type> where
    U: FnCaster
[src]

Fetches a function from the interface. Read more

impl VersionBinding for CBase<'_>[src]

unsafe fn new_short(&self, major: i32, minor: i32, patch: i32) -> Version[src]

Constructs a new version. Read more

unsafe fn new_long(
    &self,
    major: i32,
    minor: i32,
    patch: i32,
    release_type: ReleaseType,
    release_number: i8
) -> Version
[src]

Constructs a new version. Read more

unsafe fn new_full(
    &self,
    major: i32,
    minor: i32,
    patch: i32,
    release_type: ReleaseType,
    release_number: i8,
    build: i64
) -> Version
[src]

Constructs a new version. Read more

unsafe fn from_string(
    &self,
    buffer: NonNullConst<ConstSpan<u8>>
) -> Result<Version, Error>
[src]

Constructs a version from a string. Read more

unsafe fn string_length_short(&self, version: NonNullConst<Version>) -> usize[src]

Computes the length of the short version string. Read more

unsafe fn string_length_long(&self, version: NonNullConst<Version>) -> usize[src]

Computes the length of the long version string. Read more

unsafe fn string_length_full(&self, version: NonNullConst<Version>) -> usize[src]

Computes the length of the full version string. Read more

unsafe fn as_string_short(
    &self,
    version: NonNullConst<Version>,
    buffer: NonNull<MutSpan<u8>>
) -> Result<usize, Error>
[src]

Represents the version as a short string. Read more

unsafe fn as_string_long(
    &self,
    version: NonNullConst<Version>,
    buffer: NonNull<MutSpan<u8>>
) -> Result<usize, Error>
[src]

Represents the version as a long string. Read more

unsafe fn as_string_full(
    &self,
    version: NonNullConst<Version>,
    buffer: NonNull<MutSpan<u8>>
) -> Result<usize, Error>
[src]

Represents the version as a full string. Read more

unsafe fn string_is_valid(
    &self,
    version_string: NonNullConst<ConstSpan<u8>>
) -> Bool
[src]

Checks whether the version string is valid. Read more

unsafe fn compare(
    &self,
    lhs: NonNullConst<Version>,
    rhs: NonNullConst<Version>
) -> i32
[src]

Compares two versions. Read more

unsafe fn compare_weak(
    &self,
    lhs: NonNullConst<Version>,
    rhs: NonNullConst<Version>
) -> i32
[src]

Compares two versions. Read more

unsafe fn compare_strong(
    &self,
    lhs: NonNullConst<Version>,
    rhs: NonNullConst<Version>
) -> i32
[src]

Compares two versions. Read more

unsafe fn is_compatible(
    &self,
    lhs: NonNullConst<Version>,
    rhs: NonNullConst<Version>
) -> Bool
[src]

Checks for compatibility of two versions. Read more

Auto Trait Implementations

impl<'interface> !RefUnwindSafe for CBase<'interface>

impl<'interface> !Send for CBase<'interface>

impl<'interface> !Sync for CBase<'interface>

impl<'interface> Unpin for CBase<'interface>

impl<'interface> UnwindSafe for CBase<'interface>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> VersionAPI for T where
    T: VersionBinding
[src]

pub fn new_short(&Self, i32, i32, i32) -> Version[src]

Constructs a new version. Read more

pub fn new_long(&Self, i32, i32, i32, ReleaseType, i8) -> Version[src]

Constructs a new version. Read more

pub fn new_full(&Self, i32, i32, i32, ReleaseType, i8, i64) -> Version[src]

Constructs a new version. Read more

pub fn from_string(&Self, impl AsRef<str>) -> Result<Version, Error>[src]

Constructs a version from a string. Read more

pub fn string_length_short(&Self, &Version) -> usize[src]

Computes the length of the short version string. Read more

pub fn string_length_long(&Self, &Version) -> usize[src]

Computes the length of the long version string. Read more

pub fn string_length_full(&Self, &Version) -> usize[src]

Computes the length of the full version string. Read more

pub fn as_string_short(&Self, &Version, impl AsMut<str>) -> Result<usize, Error>[src]

Represents the version as a short string. Read more

pub fn as_string_long(&Self, &Version, impl AsMut<str>) -> Result<usize, Error>[src]

Represents the version as a long string. Read more

pub fn as_string_full(&Self, &Version, impl AsMut<str>) -> Result<usize, Error>[src]

Represents the version as a full string. Read more

pub fn string_is_valid(&Self, impl AsRef<str>) -> bool[src]

Checks whether the version string is valid. Read more

pub fn compare(&Self, &Version, &Version) -> Ordering[src]

Compares two versions. Read more

pub fn compare_weak(&Self, &Version, &Version) -> Ordering[src]

Compares two versions. Read more

pub fn compare_strong(&Self, &Version, &Version) -> Ordering[src]

Compares two versions. Read more

pub fn is_compatible(&Self, &Version, &Version) -> bool[src]

Checks for compatibility of two versions. Read more