pub struct ParagraphStyle {Show 22 fields
pub alignment: Option<String>,
pub avoid_widow_and_orphan: Option<bool>,
pub border_between: Option<ParagraphBorder>,
pub border_bottom: Option<ParagraphBorder>,
pub border_left: Option<ParagraphBorder>,
pub border_right: Option<ParagraphBorder>,
pub border_top: Option<ParagraphBorder>,
pub direction: Option<String>,
pub heading_id: Option<String>,
pub indent_end: Option<Dimension>,
pub indent_first_line: Option<Dimension>,
pub indent_start: Option<Dimension>,
pub keep_lines_together: Option<bool>,
pub keep_with_next: Option<bool>,
pub line_spacing: Option<f32>,
pub named_style_type: Option<String>,
pub page_break_before: Option<bool>,
pub shading: Option<Shading>,
pub space_above: Option<Dimension>,
pub space_below: Option<Dimension>,
pub spacing_mode: Option<String>,
pub tab_stops: Option<Vec<TabStop>>,
}
Expand description
Styles that apply to a whole paragraph. Inherited paragraph styles are represented as unset fields in this message. A paragraph style’s parent depends on where the paragraph style is defined: * The ParagraphStyle on a Paragraph inherits from the paragraph’s corresponding named style type. * The ParagraphStyle on a named style inherits from the normal text named style. * The ParagraphStyle of the normal text named style inherits from the default paragraph style in the Docs editor. * The ParagraphStyle on a Paragraph element that’s contained in a table may inherit its paragraph style from the table style. If the paragraph style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.
This type is not used in any activity, and only used as part of another schema.
Fields§
§alignment: Option<String>
The text alignment for this paragraph.
avoid_widow_and_orphan: Option<bool>
Whether to avoid widows and orphans for the paragraph. If unset, the value is inherited from the parent.
border_between: Option<ParagraphBorder>
The border between this paragraph and the next and previous paragraphs. If unset, the value is inherited from the parent. The between border is rendered when the adjacent paragraph has the same border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
border_bottom: Option<ParagraphBorder>
The border at the bottom of this paragraph. If unset, the value is inherited from the parent. The bottom border is rendered when the paragraph below has different border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
border_left: Option<ParagraphBorder>
The border to the left of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
border_right: Option<ParagraphBorder>
The border to the right of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
border_top: Option<ParagraphBorder>
The border at the top of this paragraph. If unset, the value is inherited from the parent. The top border is rendered when the paragraph above has different border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.
direction: Option<String>
The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since paragraph direction is not inherited.
heading_id: Option<String>
The heading ID of the paragraph. If empty, then this paragraph is not a heading. This property is read-only.
indent_end: Option<Dimension>
The amount of indentation for the paragraph on the side that corresponds to the end of the text, based on the current paragraph direction. If unset, the value is inherited from the parent.
indent_first_line: Option<Dimension>
The amount of indentation for the first line of the paragraph. If unset, the value is inherited from the parent.
indent_start: Option<Dimension>
The amount of indentation for the paragraph on the side that corresponds to the start of the text, based on the current paragraph direction. If unset, the value is inherited from the parent.
keep_lines_together: Option<bool>
Whether all lines of the paragraph should be laid out on the same page or column if possible. If unset, the value is inherited from the parent.
keep_with_next: Option<bool>
Whether at least a part of this paragraph should be laid out on the same page or column as the next paragraph if possible. If unset, the value is inherited from the parent.
line_spacing: Option<f32>
The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent.
named_style_type: Option<String>
The named style type of the paragraph. Since updating the named style type affects other properties within ParagraphStyle, the named style type is applied before the other properties are updated.
page_break_before: Option<bool>
Whether the current paragraph should always start at the beginning of a page. If unset, the value is inherited from the parent. Attempting to update page_break_before for paragraphs in unsupported regions, including Table, Header, Footer and Footnote, can result in an invalid document state that returns a 400 bad request error.
shading: Option<Shading>
The shading of the paragraph. If unset, the value is inherited from the parent.
space_above: Option<Dimension>
The amount of extra space above the paragraph. If unset, the value is inherited from the parent.
space_below: Option<Dimension>
The amount of extra space below the paragraph. If unset, the value is inherited from the parent.
spacing_mode: Option<String>
The spacing mode for the paragraph.
tab_stops: Option<Vec<TabStop>>
A list of the tab stops for this paragraph. The list of tab stops is not inherited. This property is read-only.
Trait Implementations§
Source§impl Clone for ParagraphStyle
impl Clone for ParagraphStyle
Source§fn clone(&self) -> ParagraphStyle
fn clone(&self) -> ParagraphStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ParagraphStyle
impl Debug for ParagraphStyle
Source§impl Default for ParagraphStyle
impl Default for ParagraphStyle
Source§fn default() -> ParagraphStyle
fn default() -> ParagraphStyle
Source§impl<'de> Deserialize<'de> for ParagraphStyle
impl<'de> Deserialize<'de> for ParagraphStyle
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>,
Source§impl Serialize for ParagraphStyle
impl Serialize for ParagraphStyle
impl Part for ParagraphStyle
Auto Trait Implementations§
impl Freeze for ParagraphStyle
impl RefUnwindSafe for ParagraphStyle
impl Send for ParagraphStyle
impl Sync for ParagraphStyle
impl Unpin for ParagraphStyle
impl UnwindSafe for ParagraphStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more