vizia::binding

Trait ResGet

Source
pub trait ResGet<T> {
    // Required methods
    fn get_ref<'a>(
        &'a self,
        cx: &'a impl DataContext,
    ) -> Option<LensValue<'a, T>>;
    fn get(&self, _: &impl DataContext) -> T;
}
Expand description

A trait for retrieving the value of a lens.

Required Methods§

Source

fn get_ref<'a>(&'a self, cx: &'a impl DataContext) -> Option<LensValue<'a, T>>

Returns the value of a lens by reference.

Source

fn get(&self, _: &impl DataContext) -> T

returns the value of a lens by value.

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§

Source§

impl ResGet<bool> for bool

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, bool>>

Source§

fn get(&self, _: &impl DataContext) -> bool

Source§

impl ResGet<char> for char

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, char>>

Source§

fn get(&self, _: &impl DataContext) -> char

Source§

impl ResGet<f32> for f32

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, f32>>

Source§

fn get(&self, _: &impl DataContext) -> f32

Source§

impl ResGet<f64> for f64

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, f64>>

Source§

fn get(&self, _: &impl DataContext) -> f64

Source§

impl ResGet<i8> for i8

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, i8>>

Source§

fn get(&self, _: &impl DataContext) -> i8

Source§

impl ResGet<i16> for i16

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, i16>>

Source§

fn get(&self, _: &impl DataContext) -> i16

Source§

impl ResGet<i32> for i32

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, i32>>

Source§

fn get(&self, _: &impl DataContext) -> i32

Source§

impl ResGet<i64> for i64

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, i64>>

Source§

fn get(&self, _: &impl DataContext) -> i64

Source§

impl ResGet<i128> for i128

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, i128>>

Source§

fn get(&self, _: &impl DataContext) -> i128

Source§

impl ResGet<isize> for isize

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, isize>>

Source§

fn get(&self, _: &impl DataContext) -> isize

Source§

impl ResGet<u8> for u8

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, u8>>

Source§

fn get(&self, _: &impl DataContext) -> u8

Source§

impl ResGet<u16> for u16

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, u16>>

Source§

fn get(&self, _: &impl DataContext) -> u16

Source§

impl ResGet<u32> for u32

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, u32>>

Source§

fn get(&self, _: &impl DataContext) -> u32

Source§

impl ResGet<u64> for u64

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, u64>>

Source§

fn get(&self, _: &impl DataContext) -> u64

Source§

impl ResGet<u128> for u128

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, u128>>

Source§

fn get(&self, _: &impl DataContext) -> u128

Source§

impl ResGet<usize> for usize

Source§

fn get_ref<'a>(&self, _: &impl DataContext) -> Option<LensValue<'_, usize>>

Source§

fn get(&self, _: &impl DataContext) -> usize

Source§

impl ResGet<String> for String

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, String>>

Source§

fn get(&self, _: &impl DataContext) -> String

Source§

impl<'s> ResGet<&'s str> for &'s str

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, &'s str>>

Source§

fn get(&self, _: &impl DataContext) -> &'s str

Source§

impl<'s> ResGet<&'s String> for &'s String

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, &'s String>>

Source§

fn get(&self, _: &impl DataContext) -> &'s String

Source§

impl<T1, T2> ResGet<(T1, T2)> for (T1, T2)
where T1: Clone, T2: Clone,

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, (T1, T2)>>

Source§

fn get(&self, _cx: &impl DataContext) -> (T1, T2)

Source§

impl<T1, T2, T3> ResGet<(T1, T2, T3)> for (T1, T2, T3)
where T1: Clone, T2: Clone, T3: Clone,

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, (T1, T2, T3)>>

Source§

fn get(&self, _cx: &impl DataContext) -> (T1, T2, T3)

Source§

impl<T1, T2, T3, T4> ResGet<(T1, T2, T3, T4)> for (T1, T2, T3, T4)
where T1: Clone, T2: Clone, T3: Clone, T4: Clone,

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, (T1, T2, T3, T4)>>

Source§

fn get(&self, _cx: &impl DataContext) -> (T1, T2, T3, T4)

Source§

impl<T> ResGet<Option<T>> for Option<T>
where T: Clone + ResGet<T>,

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, Option<T>>>

Source§

fn get(&self, _: &impl DataContext) -> Option<T>

Source§

impl<T> ResGet<Vec<T>> for Vec<T>
where T: Clone + ResGet<T>,

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, Vec<T>>>

Source§

fn get(&self, _: &impl DataContext) -> Vec<T>

Source§

impl<T, const N: usize> ResGet<[T; N]> for [T; N]
where T: Clone + ResGet<T>,

Source§

fn get_ref<'a>( &'a self, _: &'a impl DataContext, ) -> Option<LensValue<'a, [T; N]>>

Source§

fn get(&self, _: &impl DataContext) -> [T; N]

Implementors§

Source§

impl ResGet<LayoutType> for LayoutType

Source§

impl ResGet<Units> for Units

Source§

impl ResGet<Alignment> for Alignment

Source§

impl ResGet<Angle> for Angle

Source§

impl ResGet<Color> for Color

Source§

impl ResGet<CornerShape> for CornerShape

Source§

impl ResGet<CursorIcon> for CursorIcon

Source§

impl ResGet<Display> for Display

Source§

impl ResGet<FamilyOwned> for FamilyOwned

Source§

impl ResGet<Filter> for Filter

Source§

impl ResGet<FontSlant> for FontSlant

Source§

impl ResGet<FontWeightKeyword> for FontWeightKeyword

Source§

impl ResGet<FontWidth> for FontWidth

Source§

impl ResGet<Length> for Length

Source§

impl ResGet<LengthOrPercentage> for LengthOrPercentage

Source§

impl ResGet<LengthValue> for LengthValue

Source§

impl ResGet<Overflow> for Overflow

Source§

impl ResGet<PointerEvents> for PointerEvents

Source§

impl ResGet<PositionType> for PositionType

Source§

impl ResGet<TextAlign> for TextAlign

Source§

impl ResGet<TextOverflow> for TextOverflow

Source§

impl ResGet<TextStrokeStyle> for TextStrokeStyle

Source§

impl ResGet<Transform> for Transform

Source§

impl ResGet<Visibility> for Visibility

Source§

impl ResGet<AvatarVariant> for AvatarVariant

Source§

impl ResGet<BadgePlacement> for BadgePlacement

Source§

impl ResGet<ButtonVariant> for ButtonVariant

Source§

impl ResGet<ChipVariant> for ChipVariant

Source§

impl ResGet<Orientation> for Orientation

Source§

impl ResGet<Placement> for Placement

Source§

impl ResGet<Selectable> for Selectable

Source§

impl ResGet<SpinboxIcons> for SpinboxIcons

Source§

impl ResGet<LinearGradientBuilder> for LinearGradientBuilder

Source§

impl ResGet<ShadowBuilder> for ShadowBuilder

Source§

impl ResGet<FontVariation> for FontVariation

Source§

impl ResGet<FontWeight> for FontWeight

Source§

impl ResGet<LineClamp> for LineClamp

Source§

impl ResGet<LinearGradient> for LinearGradient

Source§

impl ResGet<Opacity> for Opacity

Source§

impl ResGet<Position> for Position

Source§

impl ResGet<RGBA> for RGBA

Source§

impl ResGet<Scale> for Scale

Source§

impl ResGet<Shadow> for Shadow

Source§

impl ResGet<TextDecorationLine> for TextDecorationLine

Source§

impl ResGet<TextStroke> for TextStroke

Source§

impl ResGet<Translate> for Translate

Source§

impl ResGet<String> for Localized

Source§

impl<'i> ResGet<BackgroundImage<'i>> for BackgroundImage<'i>

Source§

impl<'i> ResGet<FontFamily<'i>> for FontFamily<'i>

Source§

impl<L> ResGet<<L as Lens>::Target> for L
where L: Lens, <L as Lens>::Target: Clone,