pub trait PropertyValueWithGlobal {
type Inner;
// Required methods
fn initial() -> Self;
fn inherit() -> Self;
fn unset() -> Self;
fn var(expr: String) -> Self;
fn var_in_shorthand(shorthand: String, expr: String) -> Self;
fn to_inner_without_global(&self) -> Option<Self::Inner>;
fn to_inner(
&self,
parent: Option<&Self::Inner>,
default_value: Self::Inner,
default_inherit: bool,
) -> Option<Self::Inner>;
}Expand description
A trait for property global values, such as initial inherit unset.
Required Associated Types§
Required Methods§
Sourcefn var_in_shorthand(shorthand: String, expr: String) -> Self
fn var_in_shorthand(shorthand: String, expr: String) -> Self
Create a special var value with a shorthand property.
When parsing a shorthand property with a var(...) value,
the splitted properties should be marked this,
and the shorthand is the original shorthand propety name.
Sourcefn to_inner_without_global(&self) -> Option<Self::Inner>
fn to_inner_without_global(&self) -> Option<Self::Inner>
Convert to Self::Inner type if possible.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.