pub enum ElementKind {
Chart {
chart_type: String,
data: Value,
},
Image {
src: String,
format: ImageFormat,
},
Model3D {
src: String,
rotation: [f32; 3],
scale: f32,
},
Video {
stream_id: String,
is_live: bool,
mirror: bool,
crop: Option<CropRect>,
media_config: Option<MediaConfig>,
},
OverlayLayer {
children: Vec<ElementId>,
opacity: f32,
},
Text {
content: String,
font_size: f32,
color: String,
},
Group {
children: Vec<ElementId>,
},
}Expand description
The type of content an element contains.
Variants§
Chart
A 2D chart (bar, line, pie, etc.).
Image
A 2D image (PNG, JPG, SVG).
Model3D
A 3D model (glTF).
Fields
Video
A video stream or WebRTC feed.
Fields
§
media_config: Option<MediaConfig>Optional media quality configuration.
OverlayLayer
A transparent overlay layer for annotations on top of video.
Fields
Text
A text label or annotation.
Fields
Group
A container group for other elements.
Trait Implementations§
Source§impl Clone for ElementKind
impl Clone for ElementKind
Source§fn clone(&self) -> ElementKind
fn clone(&self) -> ElementKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementKind
impl Debug for ElementKind
Source§impl<'de> Deserialize<'de> for ElementKind
impl<'de> Deserialize<'de> for ElementKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ElementKind
impl PartialEq for ElementKind
Source§impl Serialize for ElementKind
impl Serialize for ElementKind
impl StructuralPartialEq for ElementKind
Auto Trait Implementations§
impl Freeze for ElementKind
impl RefUnwindSafe for ElementKind
impl Send for ElementKind
impl Sync for ElementKind
impl Unpin for ElementKind
impl UnwindSafe for ElementKind
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