pub struct StyleSource {
pub fill: Option<ColorSource>,
pub stroke: Option<ColorSource>,
pub stroke_width: Option<Length>,
pub opacity: Option<u32>,
pub font: Option<String>,
pub font_size: Option<Length>,
pub color: Option<ColorSource>,
}Expand description
Frontend style declaration. Typed conversion happens during expansion.
Fields§
§fill: Option<ColorSource>Fill color expression or token.
stroke: Option<ColorSource>Stroke color expression or token.
stroke_width: Option<Length>Stroke width.
opacity: Option<u32>Opacity in millionths.
font: Option<String>Font family reference.
font_size: Option<Length>Font size.
color: Option<ColorSource>Text color expression or token.
Trait Implementations§
Source§impl Clone for StyleSource
impl Clone for StyleSource
Source§fn clone(&self) -> StyleSource
fn clone(&self) -> StyleSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StyleSource
impl Debug for StyleSource
Source§impl Default for StyleSource
impl Default for StyleSource
Source§fn default() -> StyleSource
fn default() -> StyleSource
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StyleSourcewhere
StyleSource: Default,
impl<'de> Deserialize<'de> for StyleSourcewhere
StyleSource: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StyleSource
impl PartialEq for StyleSource
Source§impl Serialize for StyleSource
impl Serialize for StyleSource
impl StructuralPartialEq for StyleSource
Auto Trait Implementations§
impl Freeze for StyleSource
impl RefUnwindSafe for StyleSource
impl Send for StyleSource
impl Sync for StyleSource
impl Unpin for StyleSource
impl UnsafeUnpin for StyleSource
impl UnwindSafe for StyleSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.