[−][src]Struct grass::StyleSheet
Represents a parsed SASS stylesheet with nesting
Methods
impl StyleSheet
[src]
pub fn new(input: String) -> SassResult<String>
[src]
Write CSS to buf
, constructed from a string
use grass::{SassResult, StyleSheet}; fn main() -> SassResult<()> { let sass = StyleSheet::new("a { b { color: red; } }".to_string())?; assert_eq!(sass, "a b {\n color: red;\n}\n"); Ok(()) }
pub fn from_path<P: AsRef<Path> + Into<String> + Clone>(
p: P
) -> SassResult<String>
[src]
p: P
) -> SassResult<String>
Write CSS to buf
, constructed from a path
use grass::{SassResult, StyleSheet}; fn main() -> SassResult<()> { let sass = StyleSheet::from_path("input.scss")?; Ok(()) }
Trait Implementations
impl Clone for StyleSheet
[src]
fn clone(&self) -> StyleSheet
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StyleSheet
[src]
impl Display for StyleSheet
[src]
Print the internal representation of a parsed stylesheet
Very closely resembles the original SASS, but contains only things translatable to pure CSS: functions, variables, values, and mixins have all been evaluated.
Use StyleSheet::print_as_css
to properly convert to CSS.
Auto Trait Implementations
impl RefUnwindSafe for StyleSheet
impl Send for StyleSheet
impl Sync for StyleSheet
impl Unpin for StyleSheet
impl UnwindSafe for StyleSheet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,