pub struct RemoveHiddenElems {Show 15 fields
pub is_hidden: Option<bool>,
pub display_none: Option<bool>,
pub opacity_zero: Option<bool>,
pub circle_r_zero: Option<bool>,
pub ellipse_rx_zero: Option<bool>,
pub ellipse_ry_zero: Option<bool>,
pub rect_width_zero: Option<bool>,
pub rect_height_zero: Option<bool>,
pub pattern_width_zero: Option<bool>,
pub pattern_height_zero: Option<bool>,
pub image_width_zero: Option<bool>,
pub image_height_zero: Option<bool>,
pub path_empty_d: Option<bool>,
pub polyline_empty_points: Option<bool>,
pub polygon_empty_points: Option<bool>,
}Expand description
Fields§
Whether to remove elements with visibility set to hidden
display_none: Option<bool>Whether to remove elements with display set to none
opacity_zero: Option<bool>Whether to remove elements with opacity set to 0
circle_r_zero: Option<bool>Whether to remove <circle> with radius set to 0
ellipse_rx_zero: Option<bool>Whether to remove <ellipse> with rx set to 0
ellipse_ry_zero: Option<bool>Whether to remove <ellipse> with ry set to 0
rect_width_zero: Option<bool>Whether to remove <rect> with width set to 0
rect_height_zero: Option<bool>Whether to remove <rect> with height set to 0
pattern_width_zero: Option<bool>Whether to remove <pattern> with width set to 0
pattern_height_zero: Option<bool>Whether to remove <pattern> with height set to 0
image_width_zero: Option<bool>Whether to remove <image> with width set to 0
image_height_zero: Option<bool>Whether to remove <image> with height set to 0
path_empty_d: Option<bool>Whether to remove <path> with empty d
polyline_empty_points: Option<bool>Whether to remove <polyline> with empty points
polygon_empty_points: Option<bool>Whether to remove <polygon> with empty points
Trait Implementations§
Source§impl Clone for RemoveHiddenElems
impl Clone for RemoveHiddenElems
Source§fn clone(&self) -> RemoveHiddenElems
fn clone(&self) -> RemoveHiddenElems
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RemoveHiddenElems
impl Debug for RemoveHiddenElems
Source§impl Default for RemoveHiddenElems
impl Default for RemoveHiddenElems
Source§fn default() -> RemoveHiddenElems
fn default() -> RemoveHiddenElems
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RemoveHiddenElems
impl<'de> Deserialize<'de> for RemoveHiddenElems
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 Serialize for RemoveHiddenElems
impl Serialize for RemoveHiddenElems
Source§impl<'input, 'arena> Visitor<'input, 'arena> for RemoveHiddenElems
impl<'input, 'arena> Visitor<'input, 'arena> for RemoveHiddenElems
Source§fn prepare(
&self,
document: &Element<'input, 'arena>,
context: &mut Context<'input, 'arena, '_>,
) -> Result<PrepareOutcome, Self::Error>
fn prepare( &self, document: &Element<'input, 'arena>, context: &mut Context<'input, 'arena, '_>, ) -> Result<PrepareOutcome, Self::Error>
After analysing the document, determines whether any extra features such as
style parsing or ignoring the tree is needed Read more
Source§fn document(
&self,
document: &Element<'input, 'arena>,
context: &Context<'input, 'arena, '_>,
) -> Result<(), Self::Error>
fn document( &self, document: &Element<'input, 'arena>, context: &Context<'input, 'arena, '_>, ) -> Result<(), Self::Error>
Visits the document Read more
Source§fn exit_document(
&self,
document: &Element<'input, 'arena>,
context: &Context<'input, 'arena, '_>,
) -> Result<(), Self::Error>
fn exit_document( &self, document: &Element<'input, 'arena>, context: &Context<'input, 'arena, '_>, ) -> Result<(), Self::Error>
Exits the document Read more
Source§fn element(
&self,
element: &Element<'input, 'arena>,
context: &mut Context<'input, 'arena, '_>,
) -> Result<(), Self::Error>
fn element( &self, element: &Element<'input, 'arena>, context: &mut Context<'input, 'arena, '_>, ) -> Result<(), Self::Error>
Visits a element Read more
Source§fn exit_element(
&self,
element: &Element<'input, 'arena>,
context: &mut Context<'input, 'arena, '_>,
) -> Result<(), Self::Error>
fn exit_element( &self, element: &Element<'input, 'arena>, context: &mut Context<'input, 'arena, '_>, ) -> Result<(), Self::Error>
Exits a element Read more
Source§fn doctype(
&self,
doctype: &'arena Node<'input, 'arena>,
) -> Result<(), Self::Error>
fn doctype( &self, doctype: &'arena Node<'input, 'arena>, ) -> Result<(), Self::Error>
Visits the doctype Read more
Source§fn style(&self, style: &'arena Node<'input, 'arena>) -> Result<(), Self::Error>
fn style(&self, style: &'arena Node<'input, 'arena>) -> Result<(), Self::Error>
Visits the text of a style element Read more
Source§fn text_or_cdata(
&self,
node: &'arena Node<'input, 'arena>,
) -> Result<(), Self::Error>
fn text_or_cdata( &self, node: &'arena Node<'input, 'arena>, ) -> Result<(), Self::Error>
Visits a text or cdata node Read more
Source§fn comment(
&self,
comment: &'arena Node<'input, 'arena>,
) -> Result<(), Self::Error>
fn comment( &self, comment: &'arena Node<'input, 'arena>, ) -> Result<(), Self::Error>
Visits a comment Read more
Source§fn processing_instruction(
&self,
processing_instruction: &'arena Node<'input, 'arena>,
context: &Context<'input, 'arena, '_>,
) -> Result<(), Self::Error>
fn processing_instruction( &self, processing_instruction: &'arena Node<'input, 'arena>, context: &Context<'input, 'arena, '_>, ) -> Result<(), Self::Error>
Visits a processing instruction Read more
Source§fn start(
&self,
root: &'arena Node<'input, 'arena>,
allocator: Allocator<'input, 'arena>,
) -> Result<PrepareOutcome, Self::Error>
fn start( &self, root: &'arena Node<'input, 'arena>, allocator: Allocator<'input, 'arena>, ) -> Result<PrepareOutcome, Self::Error>
Creates context for root and visits it Read more
Source§fn start_with_path(
&self,
root: &'arena Node<'input, 'arena>,
allocator: Allocator<'input, 'arena>,
path: Option<PathBuf>,
) -> Result<PrepareOutcome, Self::Error>
fn start_with_path( &self, root: &'arena Node<'input, 'arena>, allocator: Allocator<'input, 'arena>, path: Option<PathBuf>, ) -> Result<PrepareOutcome, Self::Error>
Starts visiting the document, adding the path to the visitor’s context Read more
Source§fn start_with_info(
&self,
root: &Element<'input, 'arena>,
info: &Info<'input, 'arena>,
flags: Option<ContextFlags>,
) -> Result<PrepareOutcome, Self::Error>
fn start_with_info( &self, root: &Element<'input, 'arena>, info: &Info<'input, 'arena>, flags: Option<ContextFlags>, ) -> Result<PrepareOutcome, Self::Error>
Creates context for root using the provided information and visits it Read more
Source§fn start_with_context(
&self,
root: &Element<'input, 'arena>,
context: &mut Context<'input, 'arena, '_>,
) -> Result<PrepareOutcome, Self::Error>
fn start_with_context( &self, root: &Element<'input, 'arena>, context: &mut Context<'input, 'arena, '_>, ) -> Result<PrepareOutcome, Self::Error>
Starts visiting the document, using an already existing visitor’s context Read more
Auto Trait Implementations§
impl Freeze for RemoveHiddenElems
impl RefUnwindSafe for RemoveHiddenElems
impl Send for RemoveHiddenElems
impl Sync for RemoveHiddenElems
impl Unpin for RemoveHiddenElems
impl UnsafeUnpin for RemoveHiddenElems
impl UnwindSafe for RemoveHiddenElems
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> 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> 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 more