TreeDataGridBindingAccessor
struct · ferroui-controls-treedatagrid · v0.5.0
struct TreeDataGridBindingAccessor
The accessor of the value a binding selects from a model (TreeDataGridBindingAccessor).
Members
newcan_writelinkssample_value_was_nullvalue_typetry_create_text_selectorreadread_as_stringread_as_booleanread_as_nullable_booleanwritedispose
new
fn new(binding: &Rc<dyn BindingBase>, sample_model: Option<&BoxedValue>) -> Rc<Self>
The accessor of binding; sample_model is a model of the items, whose value tells
whether the value can be null and, for a reflection binding, the type of the value.
can_write
fn can_write(self: &Self) -> bool
Whether the binding writes values back to the model (CanWrite).
links
fn links(self: &Self) -> Vec<ObjectLink>
The objects on the binding's path whose changes the column observes (Links): the model,
then the owner of each member read below it.
sample_value_was_null
fn sample_value_was_null(self: &Self) -> bool
Whether the value of the sample model was null (SampleValueWasNull).
value_type
fn value_type(self: &Self) -> Option<ValueType>
The type of the value: the type the binding's path declares, or the type of the first value
read (ValueType).
try_create_text_selector
fn try_create_text_selector(binding: Option<&Rc<dyn BindingBase>>) -> Option<Rc<dyn Fn(&BoxedValue) -> Option<String>>>
The selector of the text binding selects from a model, if there is a binding
(TryCreateTextSelector).
read
fn read(self: &Self, model: &BoxedValue) -> Option<BoxedValue>
The value the binding selects from model (Read).
read_as_string
fn read_as_string(self: &Self, model: &BoxedValue) -> Option<String>
The text of the value (ReadAsString: ToString() of the value).
read_as_boolean
fn read_as_boolean(self: &Self, model: &BoxedValue) -> bool
The value as a boolean, false for null (ReadAsBoolean).
read_as_nullable_boolean
fn read_as_nullable_boolean(self: &Self, model: &BoxedValue) -> Option<bool>
The value as a nullable boolean (ReadAsNullableBoolean).
write
fn write(self: &Self, model: &BoxedValue, value: Option<BoxedValue>)
Writes value to model through the binding, converted to the type of the value
(Write); nothing when the binding does not write back.
dispose
fn dispose(self: &Self)
Ends the binding (Dispose).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.