Skip to main content

Crate snora_core

Crate snora_core 

Source
Expand description

§snora-core

The contract and vocabulary layer of the Snora GUI framework.

This crate has no dependency on iced. It defines:

The snora sibling crate binds these contracts to iced and provides the actual render engine. Other engines (e.g. a test double, a WGPU frontend, a WASM/HTML backend) could be built against this vocabulary without depending on iced.

§Non-goals

  • No trait-driven rendering. Earlier drafts of snora exposed a PageContract trait that declared view, dialog, toasts, etc. In practice the render engine did not consume the non-view methods, forcing users to plumb them manually. v0.4 drops the trait and keeps all overlay state as plain fields on AppLayout.

  • No user-extensible close hooks. Closing an overlay is a single concern with a single channel: AppLayout::on_close_menus and AppLayout::on_close_modals. Individual Dialog / BottomSheet values do not carry their own close messages.

Re-exports§

pub use direction::Edge;
pub use direction::LayoutDirection;
pub use icon::Icon;
pub use layout::AppLayout;
pub use menu::Menu;
pub use menu::MenuAction;
pub use menu::MenuItem;
pub use overlay::BottomSheet;
pub use overlay::Dialog;
pub use overlay::SheetHeight;
pub use sidebar::SideBar;
pub use sidebar::SideBarItem;
pub use toast::Toast;
pub use toast::ToastIntent;
pub use toast::ToastLifetime;

Modules§

direction
Logical layout direction — the foundation of ABDD (Accessible By Default and by Design).
icon
Icon vocabulary.
layout
The application skeleton — AppLayout.
menu
Header menus (File / Edit / View / … drop-downs).
overlay
Dialogs and bottom sheets — the modal overlay surfaces.
sidebar
Vertical navigation rail (icon-only sidebar).
toast
Toast notifications.