Struct Binding
pub struct Binding(/* private fields */);Expand description
Binding is the simplest form of binding. It performs a copy from source to target without caching the
value. To learn more about bindings, see AbstractBinding.
Implementations§
§impl Binding
impl Binding
pub fn create<T>(
source_path: impl AsRef<KanziStr>,
source_property_type: &PropertyType<T>,
source_field: PropertyField,
) -> Result<Binding, Error>
pub fn create<T>( source_path: impl AsRef<KanziStr>, source_property_type: &PropertyType<T>, source_field: PropertyField, ) -> Result<Binding, Error>
Creates a binding.
§Arguments
source_path- Path to source object.source_property_type- Source property type from which to bind.source_field- Field of the source property type from which to bind. UsePropertyField::Wholeto bind to the whole property.
pub fn create_with_property<T>(
source_path: impl AsRef<KanziStr>,
source_property_type: &PropertyType<T>,
) -> Result<Binding, Error>
pub fn create_with_property<T>( source_path: impl AsRef<KanziStr>, source_property_type: &PropertyType<T>, ) -> Result<Binding, Error>
Creates a binding. Whole property field will be used.
§Arguments
source_path- Path to source object.source_property_type- Source property type from which to bind.
pub fn create_with_variant<T>(variant: &Variant<T>) -> Result<Binding, Error>
pub fn create_with_variant<T>(variant: &Variant<T>) -> Result<Binding, Error>
pub fn create_with_resource_id(
resource_id: &ResourceId,
) -> Result<Binding, Error>
pub fn create_with_resource_id( resource_id: &ResourceId, ) -> Result<Binding, Error>
Methods from Deref<Target = AbstractBinding>§
pub fn as_ptr(&self) -> *mut AbstractBindingWrapper
pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
Gets a pointer to the backing C++ instance.
pub fn add_processor(
&self,
binding_processor: &BindingProcessor,
) -> Result<(), Error>
pub fn add_processor( &self, binding_processor: &BindingProcessor, ) -> Result<(), Error>
Adds binding processor.
pub fn remove_processor(
&self,
binding_processor: &BindingProcessor,
) -> Result<(), Error>
pub fn remove_processor( &self, binding_processor: &BindingProcessor, ) -> Result<(), Error>
Removes binding processor.
Trait Implementations§
§impl Inherits<AbstractBinding> for Binding
impl Inherits<AbstractBinding> for Binding
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
Auto Trait Implementations§
impl Freeze for Binding
impl RefUnwindSafe for Binding
impl !Send for Binding
impl !Sync for Binding
impl Unpin for Binding
impl UnwindSafe for Binding
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