pub struct Span<T> {
pub children: Vec<T>,
pub attributes: KeyMap<String, String>,
pub classes: ClassList,
pub height: f64,
pub depth: f64,
pub width: Option<f64>,
pub max_font_size: f64,
pub style: CssStyle,
pub is_middle: Option<(String, Options)>,
pub italic: Option<f64>,
}
Expand description
Span wrapping other DOM nodes with generic child type
Fields§
§children: Vec<T>
Child nodes contained within this span
attributes: KeyMap<String, String>
HTML attributes for this span element
classes: ClassList
CSS classes applied to this span
height: f64
Height of this span element
depth: f64
Depth of this span element
width: Option<f64>
Optional width of this span element
max_font_size: f64
Maximum font size used in this span
style: CssStyle
Inline CSS style object
is_middle: Option<(String, Options)>
For src/functions/delimsizing.rs
only
italic: Option<f64>
For src/functions/op.rs
and src/functions/supsub.rs
only
Implementations§
Trait Implementations§
Source§impl From<Span<HtmlDomNode>> for HtmlDomNode
impl From<Span<HtmlDomNode>> for HtmlDomNode
Source§impl<T: VirtualNode> VirtualNode for Span<T>
Implement VirtualNode for Span<T>
impl<T: VirtualNode> VirtualNode for Span<T>
Implement VirtualNode for Span<T>
Source§fn write_markup(&self, fmt: &mut Formatter<'_>) -> Result<(), ParseError>
fn write_markup(&self, fmt: &mut Formatter<'_>) -> Result<(), ParseError>
Convert into HTML markup by writing into the provided formatter.
impl<T> StructuralPartialEq for Span<T>
Auto Trait Implementations§
impl<T> Freeze for Span<T>
impl<T> RefUnwindSafe for Span<T>where
T: RefUnwindSafe,
impl<T> Send for Span<T>where
T: Send,
impl<T> Sync for Span<T>where
T: Sync,
impl<T> Unpin for Span<T>where
T: Unpin,
impl<T> UnwindSafe for Span<T>where
T: UnwindSafe,
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