Skip to main content

Cap

Enum Cap 

Source
pub enum Cap {
Show 17 variants ListRecycling, ListReorder, Lottie, NativeSymbols, Snapshot, NavSplit, NavHeader, Appearance, Dialogs, FileDialogs, Animation, Cover, TextEditable, TextSelectable, TextSpellCheck, MultiWindow, Toolbar,
}

Variants§

§

ListRecycling

§

ListReorder

The toolkit realizes ListProps::reorderable as drag-to-reorder rows — Native when the platform’s own mechanism drives it (NSTableView drag/drop, UITableView drag delegates, ItemTouchHelper, …), Emulated for a pointer-tracked fake (web-dom). Unsupported ⇒ the list renders normally but rows cannot be dragged (docs/list.md).

§

Lottie

§

NativeSymbols

§

Snapshot

§

NavSplit

The toolkit presents nav() as sidebar+detail split panes (desktop). Mobile stacks answer Unsupported and get push/pop presentation instead.

§

NavHeader

The toolkit shows the current destination’s title in a NATIVE header/bar — so a page needn’t repeat it in its own content. Native on XAML (the NavigationView header), UIKit (UINavigationBar), Android (MaterialToolbar), and ArkUI (NavDestination title bars). The desktop custom back-headers (AppKit/Qt/web) show a title only in stack mode, so those backends stay Unsupported (docs/navigation.md).

§

Appearance

The toolkit applies a runtime appearance override (set_appearance): native widgets restyle in place and dark_mode answers the override. Probe before showing a theme picker — on Unsupported backends the call is ignored.

§

Dialogs

The toolkit can present native alert/confirm/sheet/prompt modals (docs/dialogs.md).

§

FileDialogs

The toolkit can present native open/save file pickers (docs/files.md).

§

Animation

The toolkit runs backend-executed animation for AnimSpec intents on update/set_frame/set_opacity/set_transform (§8.4). Unsupported ⇒ animated calls apply instantly (still correct, just not animated).

§

Cover

The toolkit presents a kinds::COVER node as a native fullscreen modal surface (docs/cover.md). Unsupported ⇒ the cover piece’s content never shows.

§

TextEditable

The toolkit’s text_area can be made read-only (TextAreaProps::editable = false).

§

TextSelectable

The toolkit’s text_area selectability can be toggled (TextAreaProps::selectable). Unsupported where selection is always on (GTK) or the editor isn’t wired (ArkUI).

§

TextSpellCheck

The toolkit’s text_area has built-in spell-check/autocorrect (TextAreaProps::spellcheck). Unsupported where the toolkit ships none (GTK, Qt, ArkUI).

§

MultiWindow

The toolkit can open additional native OS windows (Toolkit::open_window, docs/windows.md). Native on the desktop backends and on mobile backends whose platform has a real secondary-window surface (iPad scenes, Android document activities, OHOS multiton abilities). On Unsupported backends day_core::open_window still works — the content presents as a fullscreen cover in the primary window instead. Probe it to adapt chrome: an Unsupported tier has no native title bar or close button, so window content should carry its own close affordance.

§

Toolbar

The toolkit gives a window a native toolbar (Toolkit::set_toolbar, docs/toolbars.md): Native on the desktop backends, Unsupported elsewhere — a phone has no toolbar, and day does not draw a fake one. Probe it to decide where a command lives: an app puts its refresh button on the toolbar where there is one and in the content where there is not.

Trait Implementations§

Source§

impl Clone for Cap

Source§

fn clone(&self) -> Cap

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 Cap

Source§

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

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

impl PartialEq for Cap

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Cap

Source§

impl Eq for Cap

Source§

impl StructuralPartialEq for Cap

Auto Trait Implementations§

§

impl Freeze for Cap

§

impl RefUnwindSafe for Cap

§

impl Send for Cap

§

impl Sync for Cap

§

impl Unpin for Cap

§

impl UnsafeUnpin for Cap

§

impl UnwindSafe for Cap

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> 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Day API ↩ Guides· daybrite.dev