Struct rsass::output::Format[][src]

pub struct Format {
    pub style: Style,
    pub precision: usize,
}

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

impl Format[src]

pub fn introspect() -> Self[src]

Create a format for introspection.

pub fn is_compressed(&self) -> bool[src]

Return true if this is a compressed format.

pub fn is_introspection(&self) -> bool[src]

Return true if this is an introspection format.

pub fn write_root(
    &self,
    items: &[Item],
    globals: ScopeRef,
    file_context: &impl FileContext
) -> Result<Vec<u8>, Error>
[src]

Write a slice of sass items in this format. The file_context is needed if there are @import statements in the sass file.

pub fn get_indent(&self, len: usize) -> &'static str[src]

Get a newline followed by len spaces, unles self is compressed.

Trait Implementations

impl Clone for Format[src]

impl Copy for Format[src]

impl Debug for Format[src]

impl Default for Format[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,