Struct ParagraphStyle

Source
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

Source§

fn clone(&self) -> ParagraphStyle

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParagraphStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ParagraphStyle

Source§

fn default() -> ParagraphStyle

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ParagraphStyle

Source§

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 Serialize for ParagraphStyle

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Part for ParagraphStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,