Skip to main content

View

Struct View 

Source
pub struct View(/* private fields */);
Expand description

A declarative Reactor subtree.

Positional fragments preserve identity by position. Keyed fragments preserve child identity by Key as items are inserted, removed, or reordered.

Implementations§

Source§

impl View

Source

pub fn empty() -> Self

Creates a fragment with no children.

Source

pub fn component<C: Component>(input: C::Input) -> Self

Creates a component view from its input.

Source

pub fn fragment(children: impl IntoViews) -> Self

Creates a statically shaped fragment whose children are identified by position.

Source

pub fn keyed_fragment<T>(children: impl IntoIterator<Item = T>) -> Self
where T: Into<KeyedView>,

Creates a dynamic fragment whose children are reconciled by key.

Source

pub fn provide<T>( context: &Context<T>, value: T, child: impl Into<Self>, ) -> Self
where T: Clone + PartialEq + 'static,

Provides a context value to child and its descendants.

Trait Implementations§

Source§

impl Clone for View

Source§

fn clone(&self) -> View

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for View

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&str> for View

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<AppBarButton> for View

Source§

fn from(value: AppBarButton) -> Self

Converts to this type from the input type.
Source§

impl From<AppBarSeparator> for View

Source§

fn from(value: AppBarSeparator) -> Self

Converts to this type from the input type.
Source§

impl From<AutoSuggestBox> for View

Source§

fn from(value: AutoSuggestBox) -> Self

Converts to this type from the input type.
Source§

impl From<BitmapIcon> for View

Source§

fn from(value: BitmapIcon) -> Self

Converts to this type from the input type.
Source§

impl From<Border> for View

Source§

fn from(value: Border) -> Self

Converts to this type from the input type.
Source§

impl From<BreadcrumbBar> for View

Source§

fn from(value: BreadcrumbBar) -> Self

Converts to this type from the input type.
Source§

impl From<Button> for View

Source§

fn from(value: Button) -> Self

Converts to this type from the input type.
Source§

impl From<CalendarDatePicker> for View

Source§

fn from(value: CalendarDatePicker) -> Self

Converts to this type from the input type.
Source§

impl From<CalendarView> for View

Source§

fn from(value: CalendarView) -> Self

Converts to this type from the input type.
Source§

impl From<Canvas> for View

Source§

fn from(value: Canvas) -> Self

Converts to this type from the input type.
Source§

impl From<CheckBox> for View

Source§

fn from(value: CheckBox) -> Self

Converts to this type from the input type.
Source§

impl From<ColorPicker> for View

Source§

fn from(value: ColorPicker) -> Self

Converts to this type from the input type.
Source§

impl From<ComboBox> for View

Source§

fn from(value: ComboBox) -> Self

Converts to this type from the input type.
Source§

impl From<CommandBar> for View

Source§

fn from(value: CommandBar) -> Self

Converts to this type from the input type.
Source§

impl From<ContentDialog> for View

Source§

fn from(value: ContentDialog) -> Self

Converts to this type from the input type.
Source§

impl From<DatePicker> for View

Source§

fn from(value: DatePicker) -> Self

Converts to this type from the input type.
Source§

impl From<DropDownButton> for View

Source§

fn from(value: DropDownButton) -> Self

Converts to this type from the input type.
Source§

impl From<Ellipse> for View

Source§

fn from(value: Ellipse) -> Self

Converts to this type from the input type.
Source§

impl From<Expander> for View

Source§

fn from(value: Expander) -> Self

Converts to this type from the input type.
Source§

impl From<FlipView> for View

Source§

fn from(value: FlipView) -> Self

Converts to this type from the input type.
Source§

impl From<FontIcon> for View

Source§

fn from(value: FontIcon) -> Self

Converts to this type from the input type.
Source§

impl From<Grid> for View

Source§

fn from(value: Grid) -> Self

Converts to this type from the input type.
Source§

impl From<GridView> for View

Source§

fn from(value: GridView) -> Self

Converts to this type from the input type.
Source§

impl From<GridViewItem> for View

Source§

fn from(value: GridViewItem) -> Self

Converts to this type from the input type.
Source§

impl From<HyperlinkButton> for View

Source§

fn from(value: HyperlinkButton) -> Self

Converts to this type from the input type.
Source§

impl From<Image> for View

Source§

fn from(value: Image) -> Self

Converts to this type from the input type.
Source§

impl From<ImageIcon> for View

Source§

fn from(value: ImageIcon) -> Self

Converts to this type from the input type.
Source§

impl From<InfoBadge> for View

Source§

fn from(value: InfoBadge) -> Self

Converts to this type from the input type.
Source§

impl From<InfoBar> for View

Source§

fn from(value: InfoBar) -> Self

Converts to this type from the input type.
Source§

impl From<ItemsRepeater> for View

Source§

fn from(value: ItemsRepeater) -> Self

Converts to this type from the input type.
Source§

impl From<Line> for View

Source§

fn from(value: Line) -> Self

Converts to this type from the input type.
Source§

impl From<ListBox> for View

Source§

fn from(value: ListBox) -> Self

Converts to this type from the input type.
Source§

impl From<ListBoxItem> for View

Source§

fn from(value: ListBoxItem) -> Self

Converts to this type from the input type.
Source§

impl From<ListView> for View

Source§

fn from(value: ListView) -> Self

Converts to this type from the input type.
Source§

impl From<ListViewItem> for View

Source§

fn from(value: ListViewItem) -> Self

Converts to this type from the input type.
Source§

impl From<MenuBar> for View

Source§

fn from(value: MenuBar) -> Self

Converts to this type from the input type.
Source§

impl From<MenuBarItem> for View

Source§

fn from(value: MenuBarItem) -> Self

Converts to this type from the input type.
Source§

impl From<NavigationView> for View

Source§

fn from(value: NavigationView) -> Self

Converts to this type from the input type.
Source§

impl From<NavigationViewItem> for View

Source§

fn from(value: NavigationViewItem) -> Self

Converts to this type from the input type.
Source§

impl From<NumberBox> for View

Source§

fn from(value: NumberBox) -> Self

Converts to this type from the input type.
Source§

impl From<PasswordBox> for View

Source§

fn from(value: PasswordBox) -> Self

Converts to this type from the input type.
Source§

impl From<PathIcon> for View

Source§

fn from(value: PathIcon) -> Self

Converts to this type from the input type.
Source§

impl From<PersonPicture> for View

Source§

fn from(value: PersonPicture) -> Self

Converts to this type from the input type.
Source§

impl From<Pivot> for View

Source§

fn from(value: Pivot) -> Self

Converts to this type from the input type.
Source§

impl From<PivotItem> for View

Source§

fn from(value: PivotItem) -> Self

Converts to this type from the input type.
Source§

impl From<ProgressBar> for View

Source§

fn from(value: ProgressBar) -> Self

Converts to this type from the input type.
Source§

impl From<ProgressRing> for View

Source§

fn from(value: ProgressRing) -> Self

Converts to this type from the input type.
Source§

impl From<RadioButton> for View

Source§

fn from(value: RadioButton) -> Self

Converts to this type from the input type.
Source§

impl From<RadioButtons> for View

Source§

fn from(value: RadioButtons) -> Self

Converts to this type from the input type.
Source§

impl From<RatingControl> for View

Source§

fn from(value: RatingControl) -> Self

Converts to this type from the input type.
Source§

impl From<Rectangle> for View

Source§

fn from(value: Rectangle) -> Self

Converts to this type from the input type.
Source§

impl From<RelativePanel> for View

Source§

fn from(value: RelativePanel) -> Self

Converts to this type from the input type.
Source§

impl From<RepeatButton> for View

Source§

fn from(value: RepeatButton) -> Self

Converts to this type from the input type.
Source§

impl From<RichEditBox> for View

Source§

fn from(value: RichEditBox) -> Self

Converts to this type from the input type.
Source§

impl From<RichTextBlock> for View

Source§

fn from(value: RichTextBlock) -> Self

Converts to this type from the input type.
Source§

impl From<ScrollView> for View

Source§

fn from(value: ScrollView) -> Self

Converts to this type from the input type.
Source§

impl From<ScrollViewer> for View

Source§

fn from(value: ScrollViewer) -> Self

Converts to this type from the input type.
Source§

impl From<SelectorBar> for View

Source§

fn from(value: SelectorBar) -> Self

Converts to this type from the input type.
Source§

impl From<SelectorBarItem> for View

Source§

fn from(value: SelectorBarItem) -> Self

Converts to this type from the input type.
Source§

impl From<Slider> for View

Source§

fn from(value: Slider) -> Self

Converts to this type from the input type.
Source§

impl From<SplitButton> for View

Source§

fn from(value: SplitButton) -> Self

Converts to this type from the input type.
Source§

impl From<SplitView> for View

Source§

fn from(value: SplitView) -> Self

Converts to this type from the input type.
Source§

impl From<StackPanel> for View

Source§

fn from(value: StackPanel) -> Self

Converts to this type from the input type.
Source§

impl From<String> for View

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<SwapChainPanel> for View

Source§

fn from(value: SwapChainPanel) -> Self

Converts to this type from the input type.
Source§

impl From<SymbolIcon> for View

Source§

fn from(value: SymbolIcon) -> Self

Converts to this type from the input type.
Source§

impl From<TabView> for View

Source§

fn from(value: TabView) -> Self

Converts to this type from the input type.
Source§

impl From<TabViewItem> for View

Source§

fn from(value: TabViewItem) -> Self

Converts to this type from the input type.
Source§

impl From<TeachingTip> for View

Source§

fn from(value: TeachingTip) -> Self

Converts to this type from the input type.
Source§

impl From<TextBlock> for View

Source§

fn from(value: TextBlock) -> Self

Converts to this type from the input type.
Source§

impl From<TextBox> for View

Source§

fn from(value: TextBox) -> Self

Converts to this type from the input type.
Source§

impl From<TimePicker> for View

Source§

fn from(value: TimePicker) -> Self

Converts to this type from the input type.
Source§

impl From<TitleBar> for View

Source§

fn from(value: TitleBar) -> Self

Converts to this type from the input type.
Source§

impl From<ToggleButton> for View

Source§

fn from(value: ToggleButton) -> Self

Converts to this type from the input type.
Source§

impl From<ToggleSwitch> for View

Source§

fn from(value: ToggleSwitch) -> Self

Converts to this type from the input type.
Source§

impl From<TreeView> for View

Source§

fn from(value: TreeView) -> Self

Converts to this type from the input type.
Source§

impl From<VariableSizedWrapGrid> for View

Source§

fn from(value: VariableSizedWrapGrid) -> Self

Converts to this type from the input type.
Source§

impl From<Viewbox> for View

Source§

fn from(value: Viewbox) -> Self

Converts to this type from the input type.
Source§

impl From<WebView2> for View

Source§

fn from(value: WebView2) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for View

Source§

fn eq(&self, other: &View) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for View

Auto Trait Implementations§

§

impl !RefUnwindSafe for View

§

impl !Send for View

§

impl !Sync for View

§

impl !UnwindSafe for View

§

impl Freeze for View

§

impl Unpin for View

§

impl UnsafeUnpin for View

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CommandBarFlyoutExt for T
where T: Into<View>,

Source§

impl<T> FlyoutExt for T
where T: Into<View>,

Source§

fn flyout(self, value: impl Into<String>) -> View

Source§

fn flyout_with(self, flyout: Flyout) -> View

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MenuExt for T
where T: Into<View>,

Source§

fn menu(self, menu: Menu) -> View

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TooltipExt for T
where T: Into<View>,

Source§

fn tooltip(self, value: impl Into<String>) -> View

Source§

fn tooltip_with(self, tooltip: Tooltip) -> View

Source§

impl<T> TreeViewExt for T
where T: Into<View>,

Source§

fn nodes(self, nodes: impl IntoIterator<Item = TreeNode>) -> View

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.