pub struct BindingBuilder<'a, 'f, 't> { /* private fields */ }
Expand description
Builder for object property bindings.
Implementations§
§impl<'a, 'f, 't> BindingBuilder<'a, 'f, 't>
impl<'a, 'f, 't> BindingBuilder<'a, 'f, 't>
pub fn transform_from_with_values<F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where
F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static,
pub fn transform_from_with_values<F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static,
Transform changed property values from the target object to the source object with the given closure.
This function operates on glib::Value
s.
See Self::transform_from
for a version which operates on concrete argument and return types.
pub fn transform_from<S, T, F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where
S: FromValue<'f>,
T: ToValue,
F: Fn(&'f Binding, S) -> Option<T> + Send + Sync + 'static,
pub fn transform_from<S, T, F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where S: FromValue<'f>, T: ToValue, F: Fn(&'f Binding, S) -> Option<T> + Send + Sync + 'static,
Transform changed property values from the target object to the source object with the given closure.
This function operates on concrete argument and return types.
See Self::transform_from_with_values
for a version which operates on glib::Value
s.
pub fn transform_to_with_values<F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where
F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static,
pub fn transform_to_with_values<F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static,
Transform changed property values from the source object to the target object with the given closure.
This function operates on glib::Value
s.
See Self::transform_to
for a version which operates on concrete argument and return types.
pub fn transform_to<S, T, F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where
S: FromValue<'t>,
T: ToValue,
F: Fn(&'t Binding, S) -> Option<T> + Send + Sync + 'static,
pub fn transform_to<S, T, F>(self, func: F) -> BindingBuilder<'a, 'f, 't>where S: FromValue<'t>, T: ToValue, F: Fn(&'t Binding, S) -> Option<T> + Send + Sync + 'static,
Transform changed property values from the source object to the target object with the given closure.
This function operates on concrete argument and return types.
See Self::transform_to_with_values
for a version which operates on glib::Value
s.
pub fn flags(self, flags: BindingFlags) -> BindingBuilder<'a, 'f, 't>
pub fn flags(self, flags: BindingFlags) -> BindingBuilder<'a, 'f, 't>
Bind the properties with the given flags.
pub fn bidirectional(self) -> BindingBuilder<'a, 'f, 't>
pub fn bidirectional(self) -> BindingBuilder<'a, 'f, 't>
Set the binding flags to BIDIRECTIONAL
.
pub fn sync_create(self) -> BindingBuilder<'a, 'f, 't>
pub fn sync_create(self) -> BindingBuilder<'a, 'f, 't>
Set the binding flags to SYNC_CREATE
.
pub fn invert_boolean(self) -> BindingBuilder<'a, 'f, 't>
pub fn invert_boolean(self) -> BindingBuilder<'a, 'f, 't>
Set the binding flags to INVERT_BOOLEAN
.