zng::var

Trait IntoVar

source
pub trait IntoVar<T>
where T: VarValue,
{ type Var: Var<T>; // Required method fn into_var(self) -> Self::Var; // Provided method fn into_boxed_var(self) -> Box<dyn VarBoxed<T>> where Self: Sized { ... } }
Expand description

A value-to-var conversion that consumes the value.

Every Var<T> implements this to convert to itself, every VarValue implements this to convert to a LocalVar<T>.

This trait is used by most properties, it allows then to accept literal values, variables and context variables all with a single signature. Together with Var<T> this gives properties great flexibility of usage, at zero-cost. Widget when blocks also use IntoVar<T> to support changing the property value depending on the widget state.

Value types can also manually implement this to support a shorthand literal syntax for when they are used in properties, this converts the shorthand value like a tuple into the actual value type and wraps it into a variable, usually LocalVar too. They can implement the trait multiple times to support different shorthand syntaxes or different types in the shorthand value.

Required Associated Types§

source

type Var: Var<T>

Variable type that will wrap the T value.

This is the LocalVar for most types or Self for variable types.

Required Methods§

source

fn into_var(self) -> Self::Var

Converts the source value into a var.

Provided Methods§

source

fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>
where Self: Sized,

Converts into BoxedVar<T>.

This method exists to help the type system infer the type in this scenario:

fn foo(foo: impl IntoVar<bool>) { }

foo(if bar {
    BAR_VAR.map(|b| !*b).boxed()
} else {
    true.into_boxed_var()
});

We need a BoxedVar<bool> to unify the input types that can be a map var or a LocalVar<bool>. Writing true.into_var().boxed() causes the type inference to fail, requiring us to write IntoVar::<bool>::into_var(true).boxed().

Implementations on Foreign Types§

source§

impl IntoVar<GradientStop> for f32

source§

fn into_var(self) -> <f32 as IntoVar<GradientStop>>::Var

Conversion to Length::Dip color hint.

source§

type Var = LocalVar<GradientStop>

source§

impl IntoVar<GradientStop> for i32

source§

fn into_var(self) -> <i32 as IntoVar<GradientStop>>::Var

Conversion to Length::Dip color hint.

source§

type Var = LocalVar<GradientStop>

source§

impl IntoVar<SaveState> for bool

source§

fn into_var(self) -> <bool as IntoVar<SaveState>>::Var

Convert true to default config and false to None.

source§

type Var = LocalVar<SaveState>

source§

impl IntoVar<DragDropData> for &'static str

source§

impl IntoVar<DragDropData> for String

source§

impl IntoVar<DragDropData> for PathBuf

source§

impl IntoVar<CommandScope> for &'static str

source§

fn into_var(self) -> <&'static str as IntoVar<CommandScope>>::Var

Widget scope.

source§

type Var = LocalVar<CommandScope>

source§

impl IntoVar<FontColorPalette> for u16

source§

impl IntoVar<FontStyleSet> for u8

source§

impl IntoVar<GlyphSource> for &'static str

source§

impl IntoVar<GlyphSource> for char

source§

impl IntoVar<ImageDownscale> for Size2D<Px, Px>

source§

impl IntoVar<ImageRepeat> for bool

source§

impl IntoVar<ImageSource> for &'static [u8]

source§

fn into_var(self) -> <&'static [u8] as IntoVar<ImageSource>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<ImageSource>

source§

impl IntoVar<ImageSource> for &str

source§

fn into_var(self) -> <&str as IntoVar<ImageSource>>::Var

Converts http:// and https:// to Download, file:// to Read the path component, and the rest to Read the string as a path.

source§

type Var = LocalVar<ImageSource>

source§

impl IntoVar<ImageSource> for &Path

source§

impl IntoVar<ImageSource> for (Uri, &'static str)

source§

fn into_var(self) -> <(Uri, &'static str) as IntoVar<ImageSource>>::Var

From (URI, HTTP-ACCEPT).

source§

type Var = LocalVar<ImageSource>

source§

impl IntoVar<ImageSource> for String

source§

fn into_var(self) -> <String as IntoVar<ImageSource>>::Var

Same as conversion from &str.

source§

type Var = LocalVar<ImageSource>

source§

impl IntoVar<ImageSource> for Arc<Vec<u8>>

source§

fn into_var(self) -> <Arc<Vec<u8>> as IntoVar<ImageSource>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<ImageSource>

source§

impl IntoVar<ImageSource> for Vec<u8>

source§

fn into_var(self) -> <Vec<u8> as IntoVar<ImageSource>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<ImageSource>

source§

impl IntoVar<ImageSource> for PathBuf

source§

impl IntoVar<L10nArgument> for &'static str

source§

impl IntoVar<L10nArgument> for bool

source§

impl IntoVar<L10nArgument> for char

source§

impl IntoVar<L10nArgument> for f32

source§

impl IntoVar<L10nArgument> for f64

source§

impl IntoVar<L10nArgument> for i8

source§

impl IntoVar<L10nArgument> for i16

source§

impl IntoVar<L10nArgument> for i32

source§

impl IntoVar<L10nArgument> for i64

source§

impl IntoVar<L10nArgument> for i128

source§

impl IntoVar<L10nArgument> for isize

source§

impl IntoVar<L10nArgument> for u8

source§

impl IntoVar<L10nArgument> for u16

source§

impl IntoVar<L10nArgument> for u32

source§

impl IntoVar<L10nArgument> for u64

source§

impl IntoVar<L10nArgument> for u128

source§

impl IntoVar<L10nArgument> for usize

source§

impl IntoVar<L10nArgument> for String

source§

impl IntoVar<L10nArgument> for FluentNumber

source§

impl IntoVar<InlineMode> for bool

source§

impl IntoVar<Length> for f32

source§

impl IntoVar<Length> for i32

source§

fn into_var(self) -> <i32 as IntoVar<Length>>::Var

Conversion to Length::Dip

source§

type Var = LocalVar<Length>

source§

impl IntoVar<CursorSource> for bool

source§

fn into_var(self) -> <bool as IntoVar<CursorSource>>::Var

Converts true to CursorIcon::Default and false to CursorSource::Hidden.

source§

type Var = LocalVar<CursorSource>

source§

impl IntoVar<CaptureMode> for bool

source§

impl IntoVar<ContextCapture> for bool

source§

impl IntoVar<ScrollToTarget> for &'static str

source§

impl IntoVar<InteractiveCaretMode> for bool

source§

impl IntoVar<TextOverflow> for &'static str

source§

impl IntoVar<TextOverflow> for bool

source§

fn into_var(self) -> <bool as IntoVar<TextOverflow>>::Var

Truncate (no suffix), or ignore.

source§

type Var = LocalVar<TextOverflow>

source§

impl IntoVar<TextOverflow> for char

source§

impl IntoVar<TextOverflow> for String

source§

impl IntoVar<HitTestMode> for bool

source§

impl IntoVar<RepeatMode> for bool

source§

fn into_var(self) -> <bool as IntoVar<RepeatMode>>::Var

Converts true to Repeat and false to the default Stretch.

source§

type Var = LocalVar<RepeatMode>

source§

impl IntoVar<Visibility> for bool

source§

fn into_var(self) -> <bool as IntoVar<Visibility>>::Var

  • true -> Visible
  • false -> Collapsed
source§

type Var = LocalVar<Visibility>

source§

impl IntoVar<TreeFilter> for bool

source§

fn into_var(self) -> <bool as IntoVar<TreeFilter>>::Var

Returns Include for true and Skip for false.

source§

type Var = LocalVar<TreeFilter>

source§

impl IntoVar<BlockWindowLoad> for bool

source§

fn into_var(self) -> <bool as IntoVar<BlockWindowLoad>>::Var

Converts true to BlockWindowLoad::enabled(1.secs()) and false to BlockWindowLoad::Disabled.

source§

type Var = LocalVar<BlockWindowLoad>

source§

impl IntoVar<BlockWindowLoad> for Duration

source§

fn into_var(self) -> <Duration as IntoVar<BlockWindowLoad>>::Var

Converts to enabled with the duration timeout.

source§

type Var = LocalVar<BlockWindowLoad>

source§

impl IntoVar<WindowIcon> for &'static [u8]

source§

fn into_var(self) -> <&'static [u8] as IntoVar<WindowIcon>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<WindowIcon>

source§

impl IntoVar<WindowIcon> for &str

source§

fn into_var(self) -> <&str as IntoVar<WindowIcon>>::Var

See ImageSource conversion from &str

source§

type Var = LocalVar<WindowIcon>

source§

impl IntoVar<WindowIcon> for &Path

source§

impl IntoVar<WindowIcon> for String

source§

fn into_var(self) -> <String as IntoVar<WindowIcon>>::Var

Same as conversion from &str.

source§

type Var = LocalVar<WindowIcon>

source§

impl IntoVar<WindowIcon> for Arc<Vec<u8>>

source§

fn into_var(self) -> <Arc<Vec<u8>> as IntoVar<WindowIcon>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<WindowIcon>

source§

impl IntoVar<WindowIcon> for Vec<u8>

source§

fn into_var(self) -> <Vec<u8> as IntoVar<WindowIcon>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<WindowIcon>

source§

impl IntoVar<WindowIcon> for PathBuf

source§

impl IntoVar<InspectMode> for bool

source§

impl IntoVar<Option<AccessCmd>> for AccessCmd

source§

impl IntoVar<Option<AccessState>> for AccessState

source§

impl IntoVar<Option<bool>> for bool

source§

impl IntoVar<Option<char>> for char

source§

impl IntoVar<Option<f32>> for f32

source§

impl IntoVar<Option<f64>> for f64

source§

impl IntoVar<Option<i8>> for i8

source§

impl IntoVar<Option<i16>> for i16

source§

impl IntoVar<Option<i32>> for i32

source§

impl IntoVar<Option<i64>> for i64

source§

impl IntoVar<Option<i128>> for i128

source§

impl IntoVar<Option<isize>> for isize

source§

impl IntoVar<Option<u8>> for u8

source§

impl IntoVar<Option<u16>> for u16

source§

impl IntoVar<Option<u32>> for u32

source§

impl IntoVar<Option<u64>> for u64

source§

impl IntoVar<Option<u128>> for u128

source§

impl IntoVar<Option<usize>> for usize

source§

impl IntoVar<Option<AccessNodeId>> for AccessNodeId

source§

impl IntoVar<Deadline> for Duration

source§

impl IntoVar<ColorMatrix> for [f32; 20]

source§

impl IntoVar<GradientRadius> for f32

source§

fn into_var(self) -> <f32 as IntoVar<GradientRadius>>::Var

Conversion to Length::DipF32 and to radius.

source§

type Var = LocalVar<GradientRadius>

source§

impl IntoVar<GradientRadius> for i32

source§

fn into_var(self) -> <i32 as IntoVar<GradientRadius>>::Var

Conversion to Length::Dip and to radius.

source§

type Var = LocalVar<GradientRadius>

source§

impl IntoVar<GradientStops> for &[Hsla]

source§

impl IntoVar<GradientStops> for &[Hsva]

source§

impl IntoVar<GradientStops> for &[Rgba]

source§

impl IntoVar<CategoryId> for &'static str

source§

impl IntoVar<CategoryId> for String

source§

impl IntoVar<DialogKind> for bool

source§

impl IntoVar<FileDialogFilters> for &'static str

source§

impl IntoVar<Response> for MsgDialogResponse

source§

impl IntoVar<Responses> for Vec<Response>

source§

impl IntoVar<TabIndex> for u32

source§

impl IntoVar<CharVariant> for u8

source§

fn into_var(self) -> <u8 as IntoVar<CharVariant>>::Var

v == 0 || v > 99 is Auto, v >= 1 && v <= 99 maps to their variant.

source§

type Var = LocalVar<CharVariant>

source§

impl IntoVar<FontFeatureState> for bool

source§

impl IntoVar<FontFeatureState> for u32

source§

fn into_var(self) -> <u32 as IntoVar<FontFeatureState>>::Var

0 is disabled, >=1 is enabled with the alt value.

source§

type Var = LocalVar<FontFeatureState>

source§

impl IntoVar<FontName> for &'static str

source§

impl IntoVar<FontName> for Cow<'static, str>

source§

impl IntoVar<FontName> for String

source§

impl IntoVar<FontNames> for &'static str

source§

impl IntoVar<FontNames> for String

source§

impl IntoVar<FontNames> for Vec<&'static str>

source§

impl IntoVar<FontNames> for Vec<FontName>

source§

impl IntoVar<FontNames> for Vec<String>

source§

impl IntoVar<FontStretch> for f32

source§

impl IntoVar<FontWeight> for f32

source§

impl IntoVar<FontWeight> for u32

source§

impl IntoVar<Shortcuts> for Vec<Shortcut>

source§

impl IntoVar<ImagePpi> for (f32, f32)

source§

impl IntoVar<ImagePpi> for f32

source§

impl IntoVar<LangFilePath> for &'static str

source§

impl IntoVar<LangFilePath> for String

source§

impl IntoVar<Langs> for Option<Lang>

source§

impl IntoVar<LayerIndex> for u32

source§

impl IntoVar<ByteLength> for usize

source§

impl IntoVar<Factor> for bool

source§

impl IntoVar<Factor> for f32

source§

impl IntoVar<GridSpacing> for f32

source§

fn into_var(self) -> <f32 as IntoVar<GridSpacing>>::Var

Column and row equal exact length.

source§

type Var = LocalVar<GridSpacing>

source§

impl IntoVar<GridSpacing> for i32

source§

fn into_var(self) -> <i32 as IntoVar<GridSpacing>>::Var

Column and row equal exact length.

source§

type Var = LocalVar<GridSpacing>

source§

impl IntoVar<Point> for f32

source§

fn into_var(self) -> <f32 as IntoVar<Point>>::Var

Splat exact length.

source§

type Var = LocalVar<Point>

source§

impl IntoVar<Point> for i32

source§

fn into_var(self) -> <i32 as IntoVar<Point>>::Var

Splat exact length.

source§

type Var = LocalVar<Point>

source§

impl IntoVar<Point> for Point2D<Dip, Dip>

source§

type Var = LocalVar<Point>

source§

fn into_var(self) -> <Point2D<Dip, Dip> as IntoVar<Point>>::Var

source§

impl IntoVar<Point> for Point2D<Px, Px>

source§

type Var = LocalVar<Point>

source§

fn into_var(self) -> <Point2D<Px, Px> as IntoVar<Point>>::Var

source§

impl IntoVar<PxConstraints2d> for (Size2D<Px, Px>, Size2D<Px, Px>)

source§

fn into_var( self, ) -> <(Size2D<Px, Px>, Size2D<Px, Px>) as IntoVar<PxConstraints2d>>::Var

New range, the minimum and maximum is computed.

source§

type Var = LocalVar<PxConstraints2d>

source§

impl IntoVar<PxConstraints2d> for Size2D<Px, Px>

source§

fn into_var(self) -> <Size2D<Px, Px> as IntoVar<PxConstraints2d>>::Var

New exact.

source§

type Var = LocalVar<PxConstraints2d>

source§

impl IntoVar<Rect> for Rect<Dip, Dip>

source§

fn into_var(self) -> <Rect<Dip, Dip> as IntoVar<Rect>>::Var

New in exact length.

source§

type Var = LocalVar<Rect>

source§

impl IntoVar<Rect> for Rect<Px, Px>

source§

fn into_var(self) -> <Rect<Px, Px> as IntoVar<Rect>>::Var

New in exact length.

source§

type Var = LocalVar<Rect>

source§

impl IntoVar<SideOffsets> for f32

source§

fn into_var(self) -> <f32 as IntoVar<SideOffsets>>::Var

All sides equal exact length.

source§

type Var = LocalVar<SideOffsets>

source§

impl IntoVar<SideOffsets> for i32

source§

fn into_var(self) -> <i32 as IntoVar<SideOffsets>>::Var

All sides equal exact length.

source§

type Var = LocalVar<SideOffsets>

source§

impl IntoVar<Size> for f32

source§

fn into_var(self) -> <f32 as IntoVar<Size>>::Var

Splat exact length.

source§

type Var = LocalVar<Size>

source§

impl IntoVar<Size> for i32

source§

fn into_var(self) -> <i32 as IntoVar<Size>>::Var

Splat exact length.

source§

type Var = LocalVar<Size>

source§

impl IntoVar<Size> for Size2D<Dip, Dip>

source§

type Var = LocalVar<Size>

source§

fn into_var(self) -> <Size2D<Dip, Dip> as IntoVar<Size>>::Var

source§

impl IntoVar<Size> for Size2D<Px, Px>

source§

type Var = LocalVar<Size>

source§

fn into_var(self) -> <Size2D<Px, Px> as IntoVar<Size>>::Var

source§

impl IntoVar<Vector> for f32

source§

fn into_var(self) -> <f32 as IntoVar<Vector>>::Var

Conversion to Length::Dip then to vector.

source§

type Var = LocalVar<Vector>

source§

impl IntoVar<Vector> for i32

source§

fn into_var(self) -> <i32 as IntoVar<Vector>>::Var

Conversion to Length::Dip then to vector.

source§

type Var = LocalVar<Vector>

source§

impl IntoVar<Vector> for Vector2D<Dip, Dip>

source§

type Var = LocalVar<Vector>

source§

fn into_var(self) -> <Vector2D<Dip, Dip> as IntoVar<Vector>>::Var

source§

impl IntoVar<Vector> for Vector2D<Px, Px>

source§

type Var = LocalVar<Vector>

source§

fn into_var(self) -> <Vector2D<Px, Px> as IntoVar<Vector>>::Var

source§

impl IntoVar<FontSynthesis> for bool

source§

impl IntoVar<ScrollRequest> for bool

source§

impl IntoVar<ScrollMode> for bool

source§

fn into_var(self) -> <bool as IntoVar<ScrollMode>>::Var

Returns ZOOM for true and NONE for false.

source§

type Var = LocalVar<ScrollMode>

source§

impl IntoVar<SmoothScrolling> for (Duration, EasingFn)

source§

impl IntoVar<SmoothScrolling> for bool

source§

fn into_var(self) -> <bool as IntoVar<SmoothScrolling>>::Var

Returns default config for true, disabled for false.

source§

type Var = LocalVar<SmoothScrolling>

source§

impl IntoVar<SmoothScrolling> for Duration

source§

fn into_var(self) -> <Duration as IntoVar<SmoothScrolling>>::Var

Linear duration of smooth transition.

source§

type Var = LocalVar<SmoothScrolling>

source§

impl IntoVar<Progress> for &'static str

source§

impl IntoVar<Progress> for (usize, usize)

source§

impl IntoVar<Progress> for bool

source§

impl IntoVar<Progress> for f32

source§

impl IntoVar<AutoSelection> for bool

source§

impl IntoVar<Txt> for &'static str

source§

type Var = LocalVar<Txt>

source§

fn into_var(self) -> <&'static str as IntoVar<Txt>>::Var

source§

impl IntoVar<Txt> for Cow<'static, str>

source§

type Var = LocalVar<Txt>

source§

fn into_var(self) -> <Cow<'static, str> as IntoVar<Txt>>::Var

source§

impl IntoVar<Txt> for char

source§

impl IntoVar<Txt> for String

source§

impl IntoVar<TouchTransformMode> for bool

source§

impl IntoVar<Importance> for u32

source§

impl IntoVar<Interactivity> for bool

source§

fn into_var(self) -> <bool as IntoVar<Interactivity>>::Var

  • true -> ENABLED
  • false -> DISABLED
source§

type Var = LocalVar<Interactivity>

source§

impl IntoVar<BorderRepeats> for bool

source§

fn into_var(self) -> <bool as IntoVar<BorderRepeats>>::Var

true is Repeat, false is Stretch.

source§

type Var = LocalVar<BorderRepeats>

source§

impl IntoVar<CornerRadius> for f32

source§

fn into_var(self) -> <f32 as IntoVar<CornerRadius>>::Var

All corners same exact length.

source§

type Var = LocalVar<CornerRadius>

source§

impl IntoVar<CornerRadius> for i32

source§

fn into_var(self) -> <i32 as IntoVar<CornerRadius>>::Var

All corners same exact length.

source§

type Var = LocalVar<CornerRadius>

source§

impl IntoVar<Parallel> for bool

source§

impl IntoVar<WidgetId> for &'static str

source§

impl IntoVar<WidgetId> for Cow<'static, str>

source§

impl IntoVar<WidgetId> for char

source§

impl IntoVar<WidgetId> for String

source§

impl IntoVar<ZIndex> for u32

source§

impl IntoVar<AutoSize> for bool

source§

fn into_var(self) -> <bool as IntoVar<AutoSize>>::Var

Returns AutoSize::CONTENT if content is true, otherwise

source§

type Var = LocalVar<AutoSize>

source§

impl IntoVar<ParallelWin> for bool

source§

impl IntoVar<WindowId> for &'static str

source§

impl IntoVar<WindowId> for Cow<'static, str>

source§

impl IntoVar<WindowId> for char

source§

impl IntoVar<WindowId> for String

source§

impl<B, R> IntoVar<GradientRadius> for (B, R)

source§

impl<C0, C1> IntoVar<Colors> for (C0, C1)
where C0: Into<LightDark>, C1: Into<LightDark>,

source§

impl<C> IntoVar<Colors> for [C; 2]
where C: Into<LightDark>,

source§

impl<C, O> IntoVar<GradientStop> for (C, O)
where C: Into<Rgba>, O: Into<Length>,

source§

impl<C, O> IntoVar<ColorStop> for (C, O)
where C: Into<Rgba>, O: Into<Length>,

source§

impl<C, R> IntoVar<GridSpacing> for (C, R)
where C: Into<Length> + Clone, R: Into<Length> + Clone,

source§

impl<C, S> IntoVar<BorderSide> for (C, S)
where C: Into<Rgba>, S: Into<BorderStyle>,

source§

fn into_var(self) -> <(C, S) as IntoVar<BorderSide>>::Var

(color, style) side.

source§

type Var = LocalVar<BorderSide>

source§

impl<C, S> IntoVar<BorderSides> for (C, S)
where C: Into<Rgba>, S: Into<BorderStyle>,

source§

fn into_var(self) -> <(C, S) as IntoVar<BorderSides>>::Var

(color, style) sides.

source§

type Var = LocalVar<BorderSides>

source§

impl<F> IntoVar<ImageSource> for (&'static [u8], F)

source§

fn into_var(self) -> <(&'static [u8], F) as IntoVar<ImageSource>>::Var

From encoded data of known format.

source§

type Var = LocalVar<ImageSource>

source§

impl<F> IntoVar<ImageSource> for (Arc<Vec<u8>>, F)

source§

fn into_var(self) -> <(Arc<Vec<u8>>, F) as IntoVar<ImageSource>>::Var

From encoded data of known format.

source§

type Var = LocalVar<ImageSource>

source§

impl<F> IntoVar<ImageSource> for (Vec<u8>, F)

source§

fn into_var(self) -> <(Vec<u8>, F) as IntoVar<ImageSource>>::Var

From encoded data of known format.

source§

type Var = LocalVar<ImageSource>

source§

impl<F> IntoVar<WindowIcon> for (&'static [u8], F)

source§

fn into_var(self) -> <(&'static [u8], F) as IntoVar<WindowIcon>>::Var

From encoded data of known format.

source§

type Var = LocalVar<WindowIcon>

source§

impl<F> IntoVar<WindowIcon> for (Arc<Vec<u8>>, F)

source§

fn into_var(self) -> <(Arc<Vec<u8>>, F) as IntoVar<WindowIcon>>::Var

From encoded data of known format.

source§

type Var = LocalVar<WindowIcon>

source§

impl<F> IntoVar<WindowIcon> for (Vec<u8>, F)

source§

fn into_var(self) -> <(Vec<u8>, F) as IntoVar<WindowIcon>>::Var

From encoded data of known format.

source§

type Var = LocalVar<WindowIcon>

source§

impl<F> IntoVar<SmoothScrolling> for (Duration, F)
where F: Fn(EasingTime) -> Factor + Send + Sync + 'static,

source§

impl<F, G> IntoVar<GlyphIcon> for (F, G)
where F: Into<FontName>, G: Into<GlyphSource>,

source§

impl<F, const N: usize> IntoVar<ImageSource> for (&'static [u8; N], F)

source§

fn into_var(self) -> <(&'static [u8; N], F) as IntoVar<ImageSource>>::Var

From encoded data of known format.

source§

type Var = LocalVar<ImageSource>

source§

impl<F, const N: usize> IntoVar<WindowIcon> for (&'static [u8; N], F)

source§

fn into_var(self) -> <(&'static [u8; N], F) as IntoVar<WindowIcon>>::Var

From encoded data of known format.

source§

type Var = LocalVar<WindowIcon>

source§

impl<L> IntoVar<GradientStops> for &[(Hsla, L)]
where L: Into<Length> + Copy,

source§

impl<L> IntoVar<GradientStops> for &[(Hsva, L)]
where L: Into<Length> + Copy,

source§

impl<L> IntoVar<GradientStops> for &[(Rgba, L)]
where L: Into<Length> + Copy,

source§

impl<L, D> IntoVar<LightDark> for (L, D)
where L: Into<Rgba>, D: Into<Rgba>,

source§

fn into_var(self) -> <(L, D) as IntoVar<LightDark>>::Var

From (light, dark) tuple.

source§

type Var = LocalVar<LightDark>

source§

impl<L, const N: usize> IntoVar<GradientStops> for &[(Hsla, L); N]
where L: Into<Length> + Copy,

source§

impl<L, const N: usize> IntoVar<GradientStops> for &[(Hsva, L); N]
where L: Into<Length> + Copy,

source§

impl<L, const N: usize> IntoVar<GradientStops> for &[(Rgba, L); N]
where L: Into<Length> + Copy,

source§

impl<L, const N: usize> IntoVar<GradientStops> for [(Hsla, L); N]
where L: Into<Length> + Copy,

source§

impl<L, const N: usize> IntoVar<GradientStops> for [(Hsva, L); N]
where L: Into<Length> + Copy,

source§

impl<L, const N: usize> IntoVar<GradientStops> for [(Rgba, L); N]
where L: Into<Length> + Copy,

source§

impl<O, S> IntoVar<Rect> for (O, S)
where O: Into<Point>, S: Into<Size>,

source§

fn into_var(self) -> <(O, S) as IntoVar<Rect>>::Var

New from origin and size.

source§

type Var = LocalVar<Rect>

source§

impl<P, O> IntoVar<AnchorTransform> for (P, O)
where P: Into<Point>, O: Into<Point>,

source§

impl<P, O> IntoVar<AnchorOffset> for (P, O)
where P: Into<Point>, O: Into<Point>,

source§

fn into_var(self) -> <(P, O) as IntoVar<AnchorOffset>>::Var

(place, origin).

source§

type Var = LocalVar<AnchorOffset>

source§

impl<P, O> IntoVar<StackDirection> for (P, O, bool)
where P: Into<Point>, O: Into<Point>,

source§

fn into_var(self) -> <(P, O, bool) as IntoVar<StackDirection>>::Var

New from place, origin, and RTL aware flag.

source§

type Var = LocalVar<StackDirection>

source§

impl<P, O> IntoVar<StackDirection> for (P, O)
where P: Into<Point>, O: Into<Point>,

source§

fn into_var(self) -> <(P, O) as IntoVar<StackDirection>>::Var

New from place and origin, not RTL aware.

source§

type Var = LocalVar<StackDirection>

source§

impl<T, R, B, L> IntoVar<FactorSideOffsets> for (T, R, B, L)
where T: Into<Factor>, R: Into<Factor>, B: Into<Factor>, L: Into<Factor>,

source§

fn into_var(self) -> <(T, R, B, L) as IntoVar<FactorSideOffsets>>::Var

New top, right, bottom, left.

source§

type Var = LocalVar<FactorSideOffsets>

source§

impl<T, R, B, L> IntoVar<SideOffsets> for (T, R, B, L)
where T: Into<Length> + Clone, R: Into<Length> + Clone, B: Into<Length> + Clone, L: Into<Length> + Clone,

source§

fn into_var(self) -> <(T, R, B, L) as IntoVar<SideOffsets>>::Var

(top, right, bottom, left)

source§

type Var = LocalVar<SideOffsets>

source§

impl<T, R, B, L> IntoVar<BorderSides> for (T, R, B, L)

source§

fn into_var(self) -> <(T, R, B, L) as IntoVar<BorderSides>>::Var

(top, right, bottom, left) sides.

source§

type Var = LocalVar<BorderSides>

source§

impl<T, R, B, L, S> IntoVar<BorderSides> for (T, R, B, L, S)
where T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>,

source§

fn into_var(self) -> <(T, R, B, L, S) as IntoVar<BorderSides>>::Var

(top-color, right-color, bottom-color, left-color, style) sides.

source§

type Var = LocalVar<BorderSides>

source§

impl<T, S> IntoVar<AnchorMode> for (T, S)

source§

fn into_var(self) -> <(T, S) as IntoVar<AnchorMode>>::Var

Custom transform and size, all else default.

source§

type Var = LocalVar<AnchorMode>

source§

impl<TB, LR> IntoVar<FactorSideOffsets> for (TB, LR)
where TB: Into<Factor>, LR: Into<Factor>,

source§

fn into_var(self) -> <(TB, LR) as IntoVar<FactorSideOffsets>>::Var

New dimension, top-bottom, left-right.

source§

type Var = LocalVar<FactorSideOffsets>

source§

impl<TB, LR> IntoVar<SideOffsets> for (TB, LR)
where TB: Into<Length> + Clone, LR: Into<Length> + Clone,

source§

fn into_var(self) -> <(TB, LR) as IntoVar<SideOffsets>>::Var

(top-bottom, left-right)

source§

type Var = LocalVar<SideOffsets>

source§

impl<TB, LR> IntoVar<BorderRepeats> for (TB, LR)
where TB: Into<RepeatMode>, LR: Into<RepeatMode>,

source§

impl<TB, LR, S> IntoVar<BorderSides> for (TB, LR, S)
where TB: Into<Rgba>, LR: Into<Rgba>, S: Into<BorderStyle>,

source§

fn into_var(self) -> <(TB, LR, S) as IntoVar<BorderSides>>::Var

(top-bottom-color, left-right-color, style) sides.

source§

type Var = LocalVar<BorderSides>

source§

impl<TL, TR, BR, BL> IntoVar<CornerRadius> for (TL, TR, BR, BL)
where TL: Into<Size>, TR: Into<Size>, BR: Into<Size>, BL: Into<Size>,

source§

fn into_var(self) -> <(TL, TR, BR, BL) as IntoVar<CornerRadius>>::Var

(top-left, top-right, bottom-left, bottom-right) corners.

source§

type Var = LocalVar<CornerRadius>

source§

impl<W, H> IntoVar<Size> for (W, H)
where W: Into<Length> + Clone, H: Into<Length> + Clone,

source§

impl<W, H> IntoVar<HeadlessMonitor> for (W, H)
where W: Into<Dip>, H: Into<Dip>,

source§

impl<W, H, F> IntoVar<HeadlessMonitor> for (W, H, F)
where W: Into<Dip>, H: Into<Dip>, F: Into<Factor>,

source§

impl<X, Y> IntoVar<Align> for (X, bool, Y)
where X: Into<Factor>, Y: Into<Factor>,

source§

type Var = LocalVar<Align>

source§

fn into_var(self) -> <(X, bool, Y) as IntoVar<Align>>::Var

source§

impl<X, Y> IntoVar<Align> for (X, Y)
where X: Into<Factor>, Y: Into<Factor>,

source§

impl<X, Y> IntoVar<Factor2d> for (X, Y)
where X: Into<Factor>, Y: Into<Factor>,

source§

impl<X, Y> IntoVar<Point> for (X, Y)
where X: Into<Length> + Clone, Y: Into<Length> + Clone,

source§

impl<X, Y> IntoVar<Vector> for (X, Y)
where X: Into<Length> + Clone, Y: Into<Length> + Clone,

source§

impl<X, Y, W, H> IntoVar<Rect> for (X, Y, W, H)
where X: Into<Length> + Clone, Y: Into<Length> + Clone, W: Into<Length> + Clone, H: Into<Length> + Clone,

source§

impl<const N: usize> IntoVar<ImageSource> for &'static [u8; N]

source§

fn into_var(self) -> <&'static [u8; N] as IntoVar<ImageSource>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<ImageSource>

source§

impl<const N: usize> IntoVar<WindowIcon> for &'static [u8; N]

source§

fn into_var(self) -> <&'static [u8; N] as IntoVar<WindowIcon>>::Var

From encoded data of Unknown format.

source§

type Var = LocalVar<WindowIcon>

source§

impl<const N: usize> IntoVar<GradientStops> for &[Hsla; N]

source§

impl<const N: usize> IntoVar<GradientStops> for &[Hsva; N]

source§

impl<const N: usize> IntoVar<GradientStops> for &[Rgba; N]

source§

impl<const N: usize> IntoVar<GradientStops> for [Hsla; N]

source§

impl<const N: usize> IntoVar<GradientStops> for [Hsva; N]

source§

impl<const N: usize> IntoVar<GradientStops> for [Rgba; N]

source§

impl<const N: usize> IntoVar<FontNames> for [&'static str; N]

source§

type Var = LocalVar<FontNames>

source§

fn into_var(self) -> <[&'static str; N] as IntoVar<FontNames>>::Var

source§

impl<const N: usize> IntoVar<FontNames> for [FontName; N]

source§

impl<const N: usize> IntoVar<FontNames> for [Txt; N]

source§

impl<const N: usize> IntoVar<FontNames> for [String; N]

source§

impl<const N: usize> IntoVar<Shortcuts> for [Shortcut; N]

Implementors§

source§

impl IntoVar<GradientStop> for Length

source§

impl IntoVar<GradientStop> for ColorStop

source§

impl IntoVar<GradientStop> for Hsla

source§

impl IntoVar<GradientStop> for Hsva

source§

impl IntoVar<GradientStop> for Rgba

source§

impl IntoVar<GradientStop> for Factor

source§

impl IntoVar<GradientStop> for FactorPercent

source§

impl IntoVar<LinearGradientAxis> for AngleDegree

source§

impl IntoVar<LinearGradientAxis> for AngleGradian

source§

impl IntoVar<LinearGradientAxis> for AngleRadian

source§

impl IntoVar<LinearGradientAxis> for AngleTurn

source§

impl IntoVar<LinearGradientAxis> for Line

source§

impl IntoVar<DragDropData> for Txt

source§

impl IntoVar<CommandScope> for Txt

source§

impl IntoVar<CommandScope> for WidgetId

source§

impl IntoVar<CommandScope> for WindowId

source§

impl IntoVar<FontColorPalette> for ColorScheme

source§

impl IntoVar<Shortcut> for GestureKey

source§

impl IntoVar<Shortcut> for ModifierGesture

source§

impl IntoVar<Shortcut> for KeyChord

source§

impl IntoVar<Shortcut> for KeyGesture

source§

impl IntoVar<GlyphSource> for Txt

source§

impl IntoVar<ImageDownscale> for Px

source§

impl IntoVar<ImageSource> for Uri

source§

impl IntoVar<ImageSource> for Txt

source§

impl IntoVar<ImageSource> for ReadOnlyVar<Img, ArcVar<Img>>

source§

impl IntoVar<L10nArgument> for Txt

source§

impl IntoVar<AnchorTransform> for AnchorOffset

source§

impl IntoVar<Length> for Dip

source§

impl IntoVar<Length> for Factor

source§

impl IntoVar<Length> for FactorPercent

source§

impl IntoVar<Length> for Px

source§

impl IntoVar<CursorSource> for CursorIcon

source§

impl IntoVar<CursorSource> for CursorImg

source§

impl IntoVar<ContextCapture> for CaptureFilter

source§

impl IntoVar<ScrollToTarget> for zng::layout::Rect

source§

impl IntoVar<ScrollToTarget> for WidgetId

source§

impl IntoVar<TextOverflow> for Txt

source§

impl IntoVar<WindowIcon> for ImageSource

source§

impl IntoVar<WindowIcon> for Uri

source§

impl IntoVar<WindowIcon> for Txt

source§

impl IntoVar<WindowIcon> for ReadOnlyVar<Img, ArcVar<Img>>

source§

impl IntoVar<Cow<'static, str>> for Txt

source§

type Var = LocalVar<Cow<'static, str>>

source§

impl IntoVar<Option<AccessCmdName>> for AccessCmdName

source§

impl IntoVar<Option<AccessRole>> for AccessRole

source§

impl IntoVar<Option<CurrentKind>> for CurrentKind

source§

impl IntoVar<Option<LiveIndicator>> for LiveIndicator

source§

impl IntoVar<Option<Orientation>> for Orientation

source§

impl IntoVar<Option<Popup>> for Popup

source§

impl IntoVar<Option<ScrollCmd>> for ScrollCmd

source§

impl IntoVar<Option<SortDirection>> for SortDirection

source§

impl IntoVar<Option<ColorScheme>> for ColorScheme

source§

impl IntoVar<Option<ImageDownscale>> for ImageDownscale

source§

impl IntoVar<Option<Orientation2D>> for Orientation2D

source§

impl IntoVar<Option<CursorIcon>> for CursorIcon

source§

impl IntoVar<Option<CursorIcon>> for ResizeDirection

source§

impl IntoVar<Option<ScrollToMode>> for ScrollToMode

source§

impl IntoVar<Option<ResizeDirection>> for ResizeDirection

source§

impl IntoVar<Option<RenderMode>> for RenderMode

source§

impl IntoVar<Option<LightDark>> for LightDark

source§

impl IntoVar<Option<Response>> for Response

source§

impl IntoVar<Option<CommandParam>> for CommandParam

source§

impl IntoVar<Option<ImageLimits>> for ImageLimits

source§

impl IntoVar<Option<ClickMode>> for ClickTrigger

source§

impl IntoVar<Option<ClickMode>> for ClickMode

source§

impl IntoVar<Option<CursorImg>> for CursorImg

source§

impl IntoVar<Option<WidgetId>> for WidgetId

source§

impl IntoVar<Option<WindowId>> for WindowId

source§

impl IntoVar<f32> for Progress

source§

impl IntoVar<AccessNodeId> for WidgetId

source§

impl IntoVar<Deadline> for DInstant

source§

impl IntoVar<ColorStop> for Hsla

source§

impl IntoVar<ColorStop> for Hsva

source§

impl IntoVar<ColorStop> for Rgba

source§

impl IntoVar<GradientRadius> for GradientRadiusBase

source§

impl IntoVar<GradientRadius> for Length

source§

impl IntoVar<GradientRadius> for Dip

source§

impl IntoVar<GradientRadius> for Factor

source§

impl IntoVar<GradientRadius> for FactorPercent

source§

impl IntoVar<GradientRadius> for Px

source§

impl IntoVar<GradientRadius> for Size

source§

impl IntoVar<Hsla> for Hsva

source§

impl IntoVar<Hsla> for PreMulRgba

source§

impl IntoVar<Hsla> for Rgba

source§

impl IntoVar<Hsva> for Hsla

source§

impl IntoVar<Hsva> for PreMulRgba

source§

impl IntoVar<Hsva> for Rgba

source§

impl IntoVar<LightDark> for Hsla

source§

impl IntoVar<LightDark> for Hsva

source§

impl IntoVar<LightDark> for Rgba

source§

impl IntoVar<PreMulRgba> for Hsla

source§

impl IntoVar<PreMulRgba> for Hsva

source§

impl IntoVar<PreMulRgba> for Rgba

source§

impl IntoVar<Rgba> for AnsiColor

source§

impl IntoVar<Rgba> for Hsla

source§

impl IntoVar<Rgba> for Hsva

source§

impl IntoVar<Rgba> for LightDark

source§

impl IntoVar<Rgba> for PreMulRgba

source§

impl IntoVar<CategoryId> for Txt

source§

impl IntoVar<FileDialogFilters> for Txt

source§

impl IntoVar<Responses> for Response

source§

impl IntoVar<FontNames> for FontName

source§

impl IntoVar<FontNames> for Txt

source§

impl IntoVar<FontStretch> for Factor

source§

impl IntoVar<FontStretch> for FactorPercent

source§

impl IntoVar<FontWeight> for AnsiWeight

source§

impl IntoVar<Shortcuts> for GestureKey

source§

impl IntoVar<Shortcuts> for ModifierGesture

source§

impl IntoVar<Shortcuts> for Shortcut

source§

impl IntoVar<Shortcuts> for KeyChord

source§

impl IntoVar<Shortcuts> for KeyGesture

source§

impl IntoVar<LangFilePath> for Txt

source§

impl IntoVar<Langs> for Lang

source§

impl IntoVar<AnchorMode> for AnchorTransform

source§

impl IntoVar<AnchorMode> for AnchorOffset

source§

impl IntoVar<Align> for Factor2d

source§

impl IntoVar<Align> for Factor

source§

impl IntoVar<Align> for FactorPercent

source§

impl IntoVar<AngleDegree> for AngleGradian

source§

impl IntoVar<AngleDegree> for AngleRadian

source§

impl IntoVar<AngleDegree> for AngleTurn

source§

impl IntoVar<AngleGradian> for AngleDegree

source§

impl IntoVar<AngleGradian> for AngleRadian

source§

impl IntoVar<AngleGradian> for AngleTurn

source§

impl IntoVar<AngleRadian> for AngleDegree

source§

impl IntoVar<AngleRadian> for AngleGradian

source§

impl IntoVar<AngleRadian> for AngleTurn

source§

impl IntoVar<AngleTurn> for AngleDegree

source§

impl IntoVar<AngleTurn> for AngleGradian

source§

impl IntoVar<AngleTurn> for AngleRadian

source§

impl IntoVar<Factor2d> for Factor

source§

impl IntoVar<Factor2d> for FactorPercent

source§

impl IntoVar<Factor> for FactorPercent

source§

impl IntoVar<Factor> for Progress

source§

impl IntoVar<FactorPercent> for Factor

source§

impl IntoVar<FactorPercent> for Progress

source§

impl IntoVar<FactorSideOffsets> for Factor

source§

impl IntoVar<FactorSideOffsets> for FactorPercent

source§

impl IntoVar<GridSpacing> for Length

source§

impl IntoVar<GridSpacing> for Factor

source§

impl IntoVar<GridSpacing> for FactorPercent

source§

impl IntoVar<GridSpacing> for PxGridSpacing

source§

impl IntoVar<Line> for PxLine

source§

impl IntoVar<Point> for Length

source§

impl IntoVar<Point> for Align

source§

impl IntoVar<Point> for Factor

source§

impl IntoVar<Point> for FactorPercent

source§

impl IntoVar<Point> for Vector

source§

impl IntoVar<Ppi> for Ppm

source§

impl IntoVar<Ppm> for Ppi

source§

impl IntoVar<PxConstraints> for Px

source§

impl IntoVar<Rect> for Size

source§

impl IntoVar<SideOffsets> for Length

source§

impl IntoVar<SideOffsets> for Factor

source§

impl IntoVar<SideOffsets> for FactorPercent

source§

impl IntoVar<SideOffsets> for SideOffsets2D<Dip, Dip>

source§

impl IntoVar<SideOffsets> for SideOffsets2D<Px, Px>

source§

impl IntoVar<Size> for Length

source§

impl IntoVar<Size> for Factor2d

source§

impl IntoVar<Size> for Factor

source§

impl IntoVar<Size> for FactorPercent

source§

impl IntoVar<Size> for zng::layout::Rect

source§

impl IntoVar<Size> for Vector

source§

impl IntoVar<Transform> for PxTransform

source§

impl IntoVar<Vector> for Length

source§

impl IntoVar<Vector> for Dip

source§

impl IntoVar<Vector> for Factor

source§

impl IntoVar<Vector> for FactorPercent

source§

impl IntoVar<Vector> for Point

source§

impl IntoVar<Vector> for Px

source§

impl IntoVar<Vector> for Size

source§

impl IntoVar<ClickMode> for ClickTrigger

source§

impl IntoVar<StyleFn> for StyleBuilder

source§

impl IntoVar<Progress> for Factor

source§

impl IntoVar<Progress> for FactorPercent

source§

impl IntoVar<Progress> for zng::task::http::Metrics

source§

impl IntoVar<Progress> for zng::task::io::Metrics

source§

impl IntoVar<Progress> for Txt

source§

impl IntoVar<Txt> for GlyphSource

source§

impl IntoVar<Txt> for FontName

source§

impl IntoVar<BorderRepeats> for RepeatMode

source§

impl IntoVar<BorderSide> for BorderStyle

source§

impl IntoVar<BorderSide> for Hsla

source§

impl IntoVar<BorderSide> for Hsva

source§

impl IntoVar<BorderSide> for Rgba

source§

impl IntoVar<BorderSides> for BorderStyle

source§

impl IntoVar<BorderSides> for Hsla

source§

impl IntoVar<BorderSides> for Hsva

source§

impl IntoVar<BorderSides> for Rgba

source§

impl IntoVar<CornerRadius> for Length

source§

impl IntoVar<CornerRadius> for CornerRadius2D<Px, Px>

source§

impl IntoVar<CornerRadius> for Factor

source§

impl IntoVar<CornerRadius> for FactorPercent

source§

impl IntoVar<CornerRadius> for Size

source§

impl IntoVar<WidgetId> for Txt

source§

impl IntoVar<WindowId> for Txt

source§

impl IntoVar<EasingTime> for Factor

source§

impl IntoVar<String> for Txt

source§

impl IntoVar<PathBuf> for Txt

source§

impl<I, O, S> IntoVar<O> for MapRef<I, O, S>
where I: VarValue, O: VarValue, S: Var<I>,

source§

type Var = MapRef<I, O, S>

source§

impl<I, O, S> IntoVar<O> for MapRefBidi<I, O, S>
where I: VarValue, O: VarValue, S: Var<I>,

source§

type Var = MapRefBidi<I, O, S>

source§

impl<T> IntoVar<T> for ArcMergeVar<T>
where T: VarValue,

source§

impl<T> IntoVar<T> for ArcVar<T>
where T: VarValue,

source§

impl<T> IntoVar<T> for ArcWhenVar<T>
where T: VarValue,

source§

impl<T> IntoVar<T> for ContextVar<T>
where T: VarValue,

source§

impl<T> IntoVar<T> for ContextualizedVar<T>
where T: VarValue,

source§

impl<T> IntoVar<T> for LocalVar<T>
where T: VarValue,

source§

impl<T> IntoVar<T> for T
where T: VarValue,

source§

impl<T, S> IntoVar<T> for ArcCowVar<T, S>
where T: VarValue, S: Var<T>,

source§

type Var = ArcCowVar<T, S>

source§

impl<T, V> IntoVar<T> for ArcFlatMapVar<T, V>
where T: VarValue, V: Var<T>,

source§

impl<T, V> IntoVar<T> for ReadOnlyVar<T, V>
where T: VarValue, V: Var<T>,