Struct sass_alt::values::SassValue
[−]
[src]
pub struct SassValue(_, _);
A wrapper type for *mut Sass_Value that also reflects ownership.
Methods
impl SassValue
[src]
fn is_null(&self) -> bool
[src]
Is this a null SassValue?
fn as_boolean<'a>(&'a self) -> Result<BooleanSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a boolean.
fn as_boolean_or_null<'a>(
&'a self
) -> Result<Option<BooleanSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<BooleanSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a boolean or null.
fn as_color<'a>(&'a self) -> Result<ColorSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a color.
fn as_color_or_null<'a>(
&'a self
) -> Result<Option<ColorSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<ColorSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a color or null.
fn as_error<'a>(&'a self) -> Result<ErrorSassValue<'a>, SassValueError>
[src]
Returns an error if this is not an error.
fn as_error_or_null<'a>(
&'a self
) -> Result<Option<ErrorSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<ErrorSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a error or null.
fn as_list<'a>(&'a self) -> Result<ListSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a list.
fn as_list_or_null<'a>(
&'a self
) -> Result<Option<ListSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<ListSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a list or null.
fn as_map<'a>(&'a self) -> Result<MapSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a map.
fn as_map_or_null<'a>(
&'a self
) -> Result<Option<MapSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<MapSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a list or null.
fn as_number<'a>(&'a self) -> Result<NumberSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a number.
fn as_number_or_null<'a>(
&'a self
) -> Result<Option<NumberSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<NumberSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a number or null.
fn as_string<'a>(&'a self) -> Result<StringSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a string.
fn as_string_or_null<'a>(
&'a self
) -> Result<Option<StringSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<StringSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a string or null.
fn as_warning<'a>(&'a self) -> Result<WarningSassValue<'a>, SassValueError>
[src]
Returns an error if this is not a warning.
fn as_warning_or_null<'a>(
&'a self
) -> Result<Option<WarningSassValue<'a>>, SassValueError>
[src]
&'a self
) -> Result<Option<WarningSassValue<'a>>, SassValueError>
Returns None if null. Returns an error if this is not a warning or null.
fn type_(&self) -> SassValueType
[src]
Type of this SassValue; useful for matching on
fn stringify(self, compressed: bool, precision: u8) -> Self
[src]
Create a new string SassValue using this object which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_null() -> Self
[src]
Creates a new null SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_boolean(value: bool) -> Self
[src]
Creates a new boolean SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_number(value: f64, unit: &CStr) -> Self
[src]
Creates a new number SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_unquoted_string(value: &CStr) -> Self
[src]
Creates a new unquoted string SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_quoted_string(value: &CStr) -> Self
[src]
Creates a new quoted string SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_warning(message: &CStr) -> Self
[src]
Creates a new warning SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_error(message: &CStr) -> Self
[src]
Creates a new error SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_color(red: f64, green: f64, blue: f64, alpha: f64) -> Self
[src]
Creates a new color SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_list(size: usize, separator: ListSeparator, _is_bracketed: bool) -> Self
[src]
Creates a new list SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.
fn new_map(size: usize) -> Self
[src]
Creates a new map SassValue which will be free-ed when it is dropped unless transfer_ownership_to_c()
is called.