Struct lcms2::MLU

source ·
pub struct MLU(/* private fields */);
Expand description

This represents owned Multi Localized Unicode type. Most methods are implemented on MLURef. This is a borrwed Multi Localized Unicode type. It holds Unicode strings associated with Locale.

Implementations§

source§

impl MLU

source

pub fn new(items: usize) -> Self

Allocates an empty multilocalized unicode object.

Methods from Deref<Target = MLURef>§

source

pub fn set_text_ascii(&mut self, text: &str, locale: Locale) -> bool

Fills an ASCII (7 bit) entry for the given Language and country.

source

pub fn set_text(&mut self, text: &str, locale: Locale) -> bool

Fills a UNICODE wide char (16 bit) entry for the given Language and country.

source

pub fn text_ascii(&self, locale: Locale) -> LCMSResult<String>

Gets an ASCII (7 bit) entry for the given Language and country.

source

pub fn text(&self, locale: Locale) -> LCMSResult<String>

Gets a Unicode entry for the given Language and country

source

pub fn tanslations(&self) -> Vec<Locale>

Obtains the translations stored in a given multilocalized unicode object.

source

pub fn tanslation(&self, locale: Locale) -> LCMSResult<Locale>

Obtains the translation rule for given multilocalized unicode object.

Trait Implementations§

source§

impl AsMut<MLURef> for MLU

source§

fn as_mut(&mut self) -> &mut MLURef

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<MLURef> for MLU

source§

fn as_ref(&self) -> &MLURef

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<MLURef> for MLU

source§

fn borrow(&self) -> &MLURef

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<MLURef> for MLU

source§

fn borrow_mut(&mut self) -> &mut MLURef

Mutably borrows from an owned value. Read more
source§

impl Deref for MLU

§

type Target = MLURef

The resulting type after dereferencing.
source§

fn deref(&self) -> &MLURef

Dereferences the value.
source§

impl DerefMut for MLU

source§

fn deref_mut(&mut self) -> &mut MLURef

Mutably dereferences the value.
source§

impl Drop for MLU

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl ForeignType for MLU

§

type CType = MLU

The raw C type.
§

type Ref = MLURef

The type representing a reference to this type.
source§

unsafe fn from_ptr(ptr: *mut MLU) -> MLU

Constructs an instance of this type from its raw type. Read more
source§

fn as_ptr(&self) -> *mut MLU

Returns a raw pointer to the wrapped value.
source§

fn into_ptr(self) -> *mut Self::CType

Consumes the wrapper and returns the raw pointer.

Auto Trait Implementations§

§

impl RefUnwindSafe for MLU

§

impl !Send for MLU

§

impl !Sync for MLU

§

impl Unpin for MLU

§

impl UnwindSafe for MLU

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

§

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

§

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.