pub struct StyleDecl {
pub id: String,
pub label_key: String,
pub label: String,
pub params: Vec<ParamDecl>,
pub suggested: bool,
}Expand description
One style: what the user picks.
Fields§
§id: StringThe kind of the style’s JSON.
label_key: StringThe key the front end translates for the label (sectionView.unstratified.style.dashed).
label: StringThe label to show when the front end has no translation for the key.
params: Vec<ParamDecl>Its parameters, in the order the form shows them.
suggested: boolThe style a front end offers a new view - hatched texture for the portions without strata. The library’s own default stays the first of the list (what a drawing has without asking: the CLI, the versioned drawings); this is the face’s suggestion, said here so that the front end spells no style. One at most.
Implementations§
Source§impl StyleDecl
impl StyleDecl
Sourcepub fn default_style(&self) -> Result<UnstratifiedStyle, Error>
pub fn default_style(&self) -> Result<UnstratifiedStyle, Error>
The style this declaration gives with every parameter at its default - the
JSON the front end starts a choice from, read back through serde.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StyleDecl
impl<'de> Deserialize<'de> for StyleDecl
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
impl StructuralPartialEq for StyleDecl
Auto Trait Implementations§
impl Freeze for StyleDecl
impl RefUnwindSafe for StyleDecl
impl Send for StyleDecl
impl Sync for StyleDecl
impl Unpin for StyleDecl
impl UnsafeUnpin for StyleDecl
impl UnwindSafe for StyleDecl
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