Expand description
Item-level declarations: protocol modules, value types, session state and components. The macros and the collector parse them identically.
Structs§
- Command
Item - Command
Param - Command
Ref - A command a feature is implemented by: a protocol command such as
feature, or a standard media command such asmedia.play. - Commands
Item - Component
Item - A
#[component]function whose body is a singleui!declaration. - Event
Item - An event a module emits:
fn opened(&self, path: String); - Events
Item - Feature
Item - One variant of a
#[bern::features]enum. - Features
Item - A
#[bern::features]enum: a feature contract’s features. - Field
Item - Param
- Player
Field - One application player in a
#[bern::players]struct. - Players
Item - A
#[bern::players]struct: media players owned by the application, shared by every window and addressed by their field names. - Protocol
Args - Arguments of
#[bern::protocol(namespace = "…", version = N)]. - Protocol
Item - A
#[bern::protocol]module: value types, one state struct, one command trait and an optional query trait. - Queries
Item - Query
Item - A read-only query:
fn search(&self, text: String, answer: Answer<Vec<Item>>); - Session
Item - A
#[bern::session]struct: typed drafts owned by a UI session. - Source
Items - Every Bern declaration found in one source file, with module paths relative to the file’s own module.
- State
Item - Value
Item - An enum or record that may cross a Bern boundary.
- Variant
Item
Enums§
Functions§
- doc_
comment - is_
bern_ attr - True for
#[name]and#[bern::name]. - parse_
component - parse_
component_ args - Parse a
#[component]function (marker attribute already removed). Parse#[component]arguments: nothing, orfeatures = Path. - parse_
component_ with - Parse a component whose
#[component(…)]arguments were read already. - parse_
features - Parse a
#[bern::features]enum (marker attribute already removed). - parse_
players - Parse a
#[bern::players]struct (marker attribute already removed). Every field is aPlayer; its name is the stableplayer_id. - parse_
protocol - Parse a protocol module (protocol attribute already removed).
- parse_
protocol_ args - Parse protocol attribute arguments.
- parse_
session - Parse a
#[bern::session]struct (marker attribute already removed). - parse_
source_ file - Collect Bern declarations from the text of one Rust source file.
- parse_
source_ file_ with_ modules - parse_
value - Parse an enum or struct marked as a Bern value type. The marker
attribute may still be present; its
pagesargument is read. - parse_
value_ args - The arguments of a
#[bern::value(…)]marker: onlypages = "slot". - type_
ref - Map a Rust type to Bern’s type vocabulary.