pub struct StringFormatValueConverter { /* private fields */ }Expand description
A value converter which formats the value with a composite format string
(see composite_format).
Implementations§
Source§impl StringFormatValueConverter
impl StringFormatValueConverter
Sourcepub fn new(
format: impl Into<String>,
inner: Option<Rc<dyn IValueConverter>>,
) -> Self
pub fn new( format: impl Into<String>, inner: Option<Rc<dyn IValueConverter>>, ) -> Self
Creates a string format value converter.
format is the format string; inner is an optional inner converter
to be called before the format takes place.
Sourcepub fn inner(&self) -> Option<&Rc<dyn IValueConverter>>
pub fn inner(&self) -> Option<&Rc<dyn IValueConverter>>
Gets an inner value converter which will be called before the string format takes place.
Trait Implementations§
Source§impl IValueConverter for StringFormatValueConverter
impl IValueConverter for StringFormatValueConverter
Source§fn convert(
&self,
value: Option<&BoxedValue>,
target_type: ValueType,
parameter: Option<&BoxedValue>,
culture: &CultureInfo,
) -> Result<Option<BoxedValue>, BindingError>
fn convert( &self, value: Option<&BoxedValue>, target_type: ValueType, parameter: Option<&BoxedValue>, culture: &CultureInfo, ) -> Result<Option<BoxedValue>, BindingError>
Converts a value on its way from the binding source to the target.
Source§fn convert_back(
&self,
_value: Option<&BoxedValue>,
_target_type: ValueType,
_parameter: Option<&BoxedValue>,
_culture: &CultureInfo,
) -> Result<Option<BoxedValue>, BindingError>
fn convert_back( &self, _value: Option<&BoxedValue>, _target_type: ValueType, _parameter: Option<&BoxedValue>, _culture: &CultureInfo, ) -> Result<Option<BoxedValue>, BindingError>
Converts a value on its way from the binding target to the source.
Source§impl MarkupTyped for StringFormatValueConverter
impl MarkupTyped for StringFormatValueConverter
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Auto Trait Implementations§
impl !RefUnwindSafe for StringFormatValueConverter
impl !Send for StringFormatValueConverter
impl !Sync for StringFormatValueConverter
impl !UnwindSafe for StringFormatValueConverter
impl Freeze for StringFormatValueConverter
impl Unpin for StringFormatValueConverter
impl UnsafeUnpin for StringFormatValueConverter
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more