Skip to main content

TextValue

Trait TextValue 

Source
pub trait TextValue: Text {
    // Required methods
    fn validate(&self, runtime: RuntimeId) -> Result<()>;
    fn read_text(&mut self) -> Result<String>;

    // Provided method
    fn reactive_text(&self) -> bool { ... }
}
Expand description

Sources are explicit: values initialize once, handles and Computed observe.

Required Methods§

Source

fn validate(&self, runtime: RuntimeId) -> Result<()>

Source

fn read_text(&mut self) -> Result<String>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TextValue for &str

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for String

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for bool

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for char

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for f32

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for f64

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for i8

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for i16

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for i32

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for i64

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for i128

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for isize

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for u8

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for u16

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for u32

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for u64

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for u128

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl TextValue for usize

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn validate(&self, _runtime: RuntimeId) -> Result<()>

Source§

impl<T: Display + 'static> TextValue for Bond<T>

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn reactive_text(&self) -> bool

Source§

fn validate(&self, runtime: RuntimeId) -> Result<()>

Source§

impl<T: Display + 'static> TextValue for Cage<T>

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn reactive_text(&self) -> bool

Source§

fn validate(&self, runtime: RuntimeId) -> Result<()>

Source§

impl<T: Display + 'static> TextValue for Vary<T>

Source§

fn read_text(&mut self) -> Result<String>

Source§

fn reactive_text(&self) -> bool

Source§

fn validate(&self, runtime: RuntimeId) -> Result<()>

Implementors§

Source§

impl<F, T> TextValue for Computed<F>
where F: FnMut() -> T + 'static, T: Display,