pub struct Format {
pub style: Style,
pub precision: usize,
}
Expand description
Specifies the format for outputing css.
The format is the style (expanded or compressed) and the precision for numeric values.
Fields§
§style: Style
The style of this format (expanded, compressed or introspection)
precision: usize
Number of decimals to use for numeric output.
Implementations§
source§impl Format
impl Format
sourcepub fn introspect() -> Self
pub fn introspect() -> Self
Create a format for introspection.
sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Return true if this is a compressed format.
sourcepub fn is_introspection(&self) -> bool
pub fn is_introspection(&self) -> bool
Return true if this is an introspection format.
sourcepub fn get_indent(&self, len: usize) -> &'static str
pub fn get_indent(&self, len: usize) -> &'static str
Get a newline followed by len spaces, unles self is compressed.
Trait Implementations§
impl Copy for Format
Auto Trait Implementations§
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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