pub struct Presentation {
pub modality: PresentationModality,
pub kind: PresentationKind,
pub payload: Value,
}Expand description
A single presentation of a value in one modality.
Fields§
§modality: PresentationModalityThe modality (visual, haptic, auditory, Braille).
kind: PresentationKindThe kind of presentation within the modality.
payload: ValueThe presentation payload — modality-specific data. For CSS: a Record of property → value. For SVG: an SVG element string. For haptic: a pattern (duration, strength pairs). For audio: an earcon ID or speech text. For Braille: a cell array.
Implementations§
Source§impl Presentation
impl Presentation
Sourcepub fn haptic_pattern(pattern: Vec<(u64, f64)>) -> Self
pub fn haptic_pattern(pattern: Vec<(u64, f64)>) -> Self
Create a haptic pattern presentation.
Sourcepub fn audio_earcon(earcon_id: &str) -> Self
pub fn audio_earcon(earcon_id: &str) -> Self
Create an audio earcon presentation.
Sourcepub fn braille_cells(cells: Vec<u8>) -> Self
pub fn braille_cells(cells: Vec<u8>) -> Self
Create a Braille cells presentation.
cells is a list of 8-bit dot patterns.
Trait Implementations§
Source§impl Clone for Presentation
impl Clone for Presentation
Auto Trait Implementations§
impl Freeze for Presentation
impl RefUnwindSafe for Presentation
impl Send for Presentation
impl Sync for Presentation
impl Unpin for Presentation
impl UnsafeUnpin for Presentation
impl UnwindSafe for Presentation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more