#[non_exhaustive]pub struct StyleInfo {Show 15 fields
pub font_size: i32,
pub pixel_font_size: f64,
pub letter_spacing: f64,
pub font_type: String,
pub bold: bool,
pub italic: bool,
pub underlined: bool,
pub strikeout: bool,
pub subscript: bool,
pub superscript: bool,
pub smallcaps: bool,
pub font_weight: i32,
pub handwritten: bool,
pub text_color: Option<Color>,
pub background_color: Option<Color>,
/* private fields */
}Expand description
Font and other text style attributes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.font_size: i32Font size in points (1 point is ¹⁄₇₂ inches).
pixel_font_size: f64Font size in pixels, equal to unrounded font_size
- resolution ÷
72.0.
letter_spacing: f64Letter spacing in points.
font_type: StringName or style of the font.
bold: boolWhether the text is bold (equivalent to
font_weight
is at least 700).
italic: boolWhether the text is italic.
underlined: boolWhether the text is underlined.
strikeout: boolWhether the text is strikethrough. This feature is not supported yet.
subscript: boolWhether the text is a subscript. This feature is not supported yet.
superscript: boolWhether the text is a superscript. This feature is not supported yet.
smallcaps: boolWhether the text is in small caps. This feature is not supported yet.
font_weight: i32TrueType weight on a scale 100 (thin) to 1000 (ultra-heavy).
Normal is 400, bold is 700.
handwritten: boolWhether the text is handwritten.
text_color: Option<Color>Color of the text.
background_color: Option<Color>Color of the background.
Implementations§
Source§impl StyleInfo
impl StyleInfo
Sourcepub fn set_font_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_font_size<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_pixel_font_size<T: Into<f64>>(self, v: T) -> Self
pub fn set_pixel_font_size<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn set_letter_spacing<T: Into<f64>>(self, v: T) -> Self
pub fn set_letter_spacing<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn set_font_type<T: Into<String>>(self, v: T) -> Self
pub fn set_font_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_italic<T: Into<bool>>(self, v: T) -> Self
pub fn set_italic<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_underlined<T: Into<bool>>(self, v: T) -> Self
pub fn set_underlined<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_strikeout<T: Into<bool>>(self, v: T) -> Self
pub fn set_strikeout<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_subscript<T: Into<bool>>(self, v: T) -> Self
pub fn set_subscript<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_superscript<T: Into<bool>>(self, v: T) -> Self
pub fn set_superscript<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_smallcaps<T: Into<bool>>(self, v: T) -> Self
pub fn set_smallcaps<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_font_weight<T: Into<i32>>(self, v: T) -> Self
pub fn set_font_weight<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_handwritten<T: Into<bool>>(self, v: T) -> Self
pub fn set_handwritten<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_text_color<T>(self, v: T) -> Self
pub fn set_text_color<T>(self, v: T) -> Self
Sets the value of text_color.
§Example
use google_cloud_type::model::Color;
let x = StyleInfo::new().set_text_color(Color::default()/* use setters */);Sourcepub fn set_or_clear_text_color<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_text_color<T>(self, v: Option<T>) -> Self
Sets or clears the value of text_color.
§Example
use google_cloud_type::model::Color;
let x = StyleInfo::new().set_or_clear_text_color(Some(Color::default()/* use setters */));
let x = StyleInfo::new().set_or_clear_text_color(None::<Color>);Sourcepub fn set_background_color<T>(self, v: T) -> Self
pub fn set_background_color<T>(self, v: T) -> Self
Sets the value of background_color.
§Example
use google_cloud_type::model::Color;
let x = StyleInfo::new().set_background_color(Color::default()/* use setters */);Sourcepub fn set_or_clear_background_color<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_background_color<T>(self, v: Option<T>) -> Self
Sets or clears the value of background_color.
§Example
use google_cloud_type::model::Color;
let x = StyleInfo::new().set_or_clear_background_color(Some(Color::default()/* use setters */));
let x = StyleInfo::new().set_or_clear_background_color(None::<Color>);Trait Implementations§
impl StructuralPartialEq for StyleInfo
Auto Trait Implementations§
impl Freeze for StyleInfo
impl RefUnwindSafe for StyleInfo
impl Send for StyleInfo
impl Sync for StyleInfo
impl Unpin for StyleInfo
impl UnsafeUnpin for StyleInfo
impl UnwindSafe for StyleInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request