Skip to main content

BindType

Trait BindType 

pub trait BindType: Sized {
    // Required methods
    fn ty() -> Type;
    fn from_bound(bound: BoundValue) -> Result<Self, String>;
}
Expand description

A Rust type a binding may have.

Required Methods§

fn ty() -> Type

fn from_bound(bound: BoundValue) -> Result<Self, String>

§Errors

The host bound a value of another type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<B> BindType for Option<B>
where B: BindType,

A binding a widget may go without: None when the instance binds nothing.

§

fn ty() -> Type

§

fn from_bound(bound: BoundValue) -> Result<Option<B>, String>

Implementors§

§

impl BindType for Bound<bool>

§

impl BindType for Bound<f64>

§

impl BindType for Bound<i64>

§

impl BindType for Bound<String>

§

impl BindType for Bound<RichText>