pub struct Element {
pub id: u64,
pub kind: ElementKind,
pub stroke: Option<u32>,
pub fill: Option<u32>,
pub label: Option<String>,
pub label_color: Option<u32>,
pub styles: Vec<StyleSpan>,
pub mindmap: Option<MindMapNodeMeta>,
}Expand description
One board element: a stable id plus its geometry/kind.
Fields§
§id: u64§kind: ElementKind§stroke: Option<u32>Stroke / ink color, packed 0xRRGGBBAA. None follows the theme ink, so
uncolored elements still adapt to light/dark. Absent in older boards → 0.
fill: Option<u32>Fill color for closed shapes (rect/ellipse), packed 0xRRGGBBAA. None
is an unfilled outline. Ignored by other kinds. Absent in older boards.
label: Option<String>Centered text label for closed shapes (rect / ellipse / …). Rendered at a
font size auto-shrunk so the wrapped text never crosses the shape’s
border (see the shape paint path). None / empty = no label; ignored by
non-shape kinds. Absent in older boards → None.
label_color: Option<u32>Color of the shape’s label, packed 0xRRGGBBAA. None
inks it with the shape’s stroke (theme ink if that’s unset too). Ignored by
non-shape kinds. Absent in older boards → None.
styles: Vec<StyleSpan>Rich-text formatting runs over the element’s text (a Text element’s content, or a shape’s label): bold / italic / underline / strikethrough / highlight, each over a byte range. Empty = unstyled. Kept sorted + non-overlapping and maintained across edits; absent in older boards.
mindmap: Option<MindMapNodeMeta>Optional whiteboard-native mind-map metadata. Only mind-map nodes carry this; lines stay regular anchored arrows.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Element
impl<'de> Deserialize<'de> for Element
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>,
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more