pub struct Stylesheet {
pub paragraph: Vec<ParagraphStyle>,
pub run: Vec<RunStyle>,
pub table: Vec<TableStyle>,
}Expand description
A collection of reusable paragraph, run, and table styles.
Fields§
§paragraph: Vec<ParagraphStyle>Ordered paragraph.
run: Vec<RunStyle>Ordered run.
table: Vec<TableStyle>Ordered table.
Implementations§
Source§impl Stylesheet
impl Stylesheet
Sourcepub fn paragraph_styles(&self) -> Iter<'_, ParagraphStyle> ⓘ
pub fn paragraph_styles(&self) -> Iter<'_, ParagraphStyle> ⓘ
Returns paragraph styles in document order.
Sourcepub fn run_styles(&self) -> Iter<'_, RunStyle> ⓘ
pub fn run_styles(&self) -> Iter<'_, RunStyle> ⓘ
Returns run styles in document order.
Sourcepub fn table_styles(&self) -> Iter<'_, TableStyle> ⓘ
pub fn table_styles(&self) -> Iter<'_, TableStyle> ⓘ
Returns table styles in document order.
Sourcepub fn define_paragraph_style(&mut self, style: ParagraphStyle) -> &mut Self
pub fn define_paragraph_style(&mut self, style: ParagraphStyle) -> &mut Self
Inserts or replaces a paragraph style by id.
Sourcepub fn add_paragraph_style(self, style: ParagraphStyle) -> Self
pub fn add_paragraph_style(self, style: ParagraphStyle) -> Self
Inserts or replaces a paragraph style by id in builder style.
Sourcepub fn define_run_style(&mut self, style: RunStyle) -> &mut Self
pub fn define_run_style(&mut self, style: RunStyle) -> &mut Self
Inserts or replaces a run style by id.
Sourcepub fn add_run_style(self, style: RunStyle) -> Self
pub fn add_run_style(self, style: RunStyle) -> Self
Inserts or replaces a run style by id in builder style.
Sourcepub fn define_table_style(&mut self, style: TableStyle) -> &mut Self
pub fn define_table_style(&mut self, style: TableStyle) -> &mut Self
Inserts or replaces a table style by id.
Sourcepub fn add_table_style(self, style: TableStyle) -> Self
pub fn add_table_style(self, style: TableStyle) -> Self
Inserts or replaces a table style by id in builder style.
Sourcepub fn paragraph_style(&self, style_id: &str) -> Option<&ParagraphStyle>
pub fn paragraph_style(&self, style_id: &str) -> Option<&ParagraphStyle>
Returns a paragraph style by id.
Sourcepub fn table_style(&self, style_id: &str) -> Option<&TableStyle>
pub fn table_style(&self, style_id: &str) -> Option<&TableStyle>
Returns a table style by id.
Trait Implementations§
Source§impl Clone for Stylesheet
impl Clone for Stylesheet
Source§fn clone(&self) -> Stylesheet
fn clone(&self) -> Stylesheet
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 Stylesheet
impl Debug for Stylesheet
Source§impl Default for Stylesheet
impl Default for Stylesheet
Source§fn default() -> Stylesheet
fn default() -> Stylesheet
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Stylesheetwhere
Stylesheet: Default,
impl<'de> Deserialize<'de> for Stylesheetwhere
Stylesheet: 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
impl Eq for Stylesheet
Source§impl JsonSchema for Stylesheet
impl JsonSchema for Stylesheet
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for Stylesheet
impl PartialEq for Stylesheet
Source§impl Serialize for Stylesheet
impl Serialize for Stylesheet
impl StructuralPartialEq for Stylesheet
Auto Trait Implementations§
impl Freeze for Stylesheet
impl RefUnwindSafe for Stylesheet
impl Send for Stylesheet
impl Sync for Stylesheet
impl Unpin for Stylesheet
impl UnsafeUnpin for Stylesheet
impl UnwindSafe for Stylesheet
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.