Struct html2text::RenderTree
source · pub struct RenderTree(/* private fields */);
Expand description
The structure of an HTML document that can be rendered using a TextDecorator
.
Implementations§
source§impl RenderTree
impl RenderTree
sourcepub fn render<D: TextDecorator>(
self,
width: usize,
decorator: D
) -> Result<RenderedText<D>, Error>
pub fn render<D: TextDecorator>( self, width: usize, decorator: D ) -> Result<RenderedText<D>, Error>
Render this document using the given decorator
and wrap it to width
columns.
sourcepub fn render_plain(
self,
width: usize
) -> Result<RenderedText<PlainDecorator>, Error>
pub fn render_plain( self, width: usize ) -> Result<RenderedText<PlainDecorator>, Error>
Render this document as plain text using the PlainDecorator
and wrap it to width
columns.
sourcepub fn render_rich(
self,
width: usize
) -> Result<RenderedText<RichDecorator>, Error>
pub fn render_rich( self, width: usize ) -> Result<RenderedText<RichDecorator>, Error>
Render this document as rich text using the RichDecorator
and wrap it to width
columns.
Trait Implementations§
source§impl Clone for RenderTree
impl Clone for RenderTree
source§fn clone(&self) -> RenderTree
fn clone(&self) -> RenderTree
Returns a copy 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 moreAuto Trait Implementations§
impl !Freeze for RenderTree
impl !RefUnwindSafe for RenderTree
impl Send for RenderTree
impl !Sync for RenderTree
impl Unpin for RenderTree
impl UnwindSafe for RenderTree
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