Struct Domain

pub struct Domain(/* private fields */);
Expand description

Domain binds Kanzi subsystems and objects together.

All objects and subsystems in Kanzi are associated with a domain when created. Objects in the same domain share access to the same subsystems. Objects from different domains cannot be used together.

Implementations§

§

impl Domain

pub const fn as_ptr(&self) -> *mut Context

pub fn get_native(&self) -> Result<NonNull<c_void>, Error>

Gets a pointer to the backing C++ instance.

§

impl Domain

pub fn get_color_workflow(&self) -> Result<ColorWorkflow, Error>

Gets the currently configured ColorWorkflow.

pub fn get_kanzi_release_version(&self) -> Result<KanziVersion, Error>

Gets the triple representing current version of Kanzi.

pub fn load_kzb_file( &self, file_name: impl AsRef<KanziStr>, ) -> Result<(), Error>

§

impl Domain

§

impl Domain

pub fn find_metaclass( &self, name: impl AsRef<KanziStr>, ) -> Result<Option<Metaclass>, Error>

pub fn create_instance<T>(&self, name: impl AsRef<KanziStr>) -> Result<T, Error>

pub fn find_property_type<T>( &self, name: impl AsRef<KanziStr>, ) -> Result<PropertyType<T>, Error>

pub fn find_abstract_property_type( &self, name: impl AsRef<KanziStr>, ) -> Result<Option<PropertyType<()>>, Error>

pub fn find_abstract_message_type( &self, name: impl AsRef<KanziStr>, ) -> Result<Option<MessageType<MessageArguments>>, Error>

pub fn create_message_arguments<T>(&self) -> Result<T, Error>

pub fn create_data_object<T>( &self, name: impl AsRef<KanziStr>, value: <T as DataObjectConstraint>::DataArg<'_>, ) -> Result<DataObject<T>, Error>

pub fn create_resource_id( &self, id: impl AsRef<KanziStr>, ) -> Result<ResourceId, Error>

§

impl Domain

pub fn submit(&self, closure: impl Task) -> Result<(), Error>

Submits a task from Kanzi thread.

The task will be dispatched to and executed on the UI thread that this task dispatcher belongs to.

Trait Implementations§

§

impl Clone for Domain

§

fn clone(&self) -> Domain

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Domain

§

impl RefUnwindSafe for Domain

§

impl !Send for Domain

§

impl !Sync for Domain

§

impl Unpin for Domain

§

impl UnwindSafe for Domain

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
§

impl<T> AsAny for T
where T: 'static,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Inherits<T> for T

§

fn upcast(self) -> Base

§

fn upcast_ref(&self) -> &Base

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.