pub struct SvgOptimizer {
pub optimizer: Optimizer,
pub svg: Svg,
}Fields§
§optimizer: Optimizer§svg: SvgImplementations§
Source§impl SvgOptimizer
impl SvgOptimizer
pub fn new(svg: Svg, optimizer: Optimizer) -> Self
Sourcepub fn open(buf: File) -> Result<Self>
pub fn open(buf: File) -> Result<Self>
Opens a SVG file from a File and creates an instance of SvgOptimizer
with it if valid.
Sourcepub fn write<W: Write>(&self, write: W) -> Result<()>
pub fn write<W: Write>(&self, write: W) -> Result<()>
Writes the underlying Svg to a std::io::Write instance.
Sourcepub fn add_optimization(&mut self, optim: Optimization)
pub fn add_optimization(&mut self, optim: Optimization)
Appends an Optimization to be performed on the SVG when
the [optimize] method is called.
Auto Trait Implementations§
impl Freeze for SvgOptimizer
impl RefUnwindSafe for SvgOptimizer
impl Send for SvgOptimizer
impl Sync for SvgOptimizer
impl Unpin for SvgOptimizer
impl UnwindSafe for SvgOptimizer
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