pub struct HtmlRenderer { /* private fields */ }Implementations§
Source§impl HtmlRenderer
impl HtmlRenderer
Sourcepub fn render(
&mut self,
html: &str,
available_width: f32,
debug: bool,
) -> Vec<DrawCommand>
pub fn render( &mut self, html: &str, available_width: f32, debug: bool, ) -> Vec<DrawCommand>
Renders the given HTML string into a list of draw commands to be used with GPUI to render HTML.
pub fn render_html( &mut self, html: &str, width: f32, debug: bool, ) -> Vec<DrawCommand>
Sourcepub fn style_tree(&mut self, html: &str) -> StyledNode
pub fn style_tree(&mut self, html: &str) -> StyledNode
Parses the given HTML into a tree and returns the root node of a style tree. Only used in test functions
Trait Implementations§
Source§impl Debug for HtmlRenderer
impl Debug for HtmlRenderer
Auto Trait Implementations§
impl Freeze for HtmlRenderer
impl RefUnwindSafe for HtmlRenderer
impl Send for HtmlRenderer
impl Sync for HtmlRenderer
impl Unpin for HtmlRenderer
impl UnsafeUnpin for HtmlRenderer
impl UnwindSafe for HtmlRenderer
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
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().