pub trait BindingBase {
// Required method
fn create_instance(
&self,
target: &FerroObject,
target_property: Option<&'static FerroProperty>,
anchor: Option<&Ref<FerroObject>>,
) -> Rc<dyn BindingExpressionBase>;
// Provided method
fn as_any(&self) -> Option<&dyn Any> { ... }
}Expand description
The base of bindings: a description from which binding expressions are instantiated on targets.
Required Methods§
Sourcefn create_instance(
&self,
target: &FerroObject,
target_property: Option<&'static FerroProperty>,
anchor: Option<&Ref<FerroObject>>,
) -> Rc<dyn BindingExpressionBase>
fn create_instance( &self, target: &FerroObject, target_property: Option<&'static FerroProperty>, anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>
Creates a binding expression from the binding.
anchor provides, if target is not an element, an object from which
to locate a data context or other elements.
This is a low-level method which returns a binding expression that is not yet connected to a binding sink, and so is inactive.
Provided Methods§
Trait Implementations§
Source§impl MarkupTyped for dyn BindingBase
impl MarkupTyped for dyn BindingBase
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Source§impl PartialEq for dyn BindingBase
Handles compare by identity (reference equality), so that they can be
held in property and untyped values.
impl PartialEq for dyn BindingBase
Handles compare by identity (reference equality), so that they can be held in property and untyped values.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: BindingBase + ?Sized> BindingBase for Rc<T>
A shared handle of a binding is itself usable where a binding is expected
(target.bind_binding(property, &binding) with binding: Rc<Binding>).
It has the identity of the binding it refers to.
impl<T: BindingBase + ?Sized> BindingBase for Rc<T>
A shared handle of a binding is itself usable where a binding is expected
(target.bind_binding(property, &binding) with binding: Rc<Binding>).
It has the identity of the binding it refers to.