Skip to main content

TextSampleEntryBuilder

Struct TextSampleEntryBuilder 

Source
pub struct TextSampleEntryBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> TextSampleEntryBuilder<S>

Source

pub fn build(self) -> TextSampleEntry
where S: IsComplete,

Finish building and return the requested object

Source

pub fn display_flags( self, value: DisplayFlags, ) -> TextSampleEntryBuilder<SetDisplayFlags<S>>
where S::DisplayFlags: IsUnset,

Optional (Some / Option setters). Default: <DisplayFlags as Default>::default().

Source

pub fn maybe_display_flags( self, value: Option<DisplayFlags>, ) -> TextSampleEntryBuilder<SetDisplayFlags<S>>
where S::DisplayFlags: IsUnset,

Optional (Some / Option setters). Default: <DisplayFlags as Default>::default().

Source

pub fn text_justification( self, value: TextJustification, ) -> TextSampleEntryBuilder<SetTextJustification<S>>
where S::TextJustification: IsUnset,

Optional (Some / Option setters). Default: <TextJustification as Default>::default().

Source

pub fn maybe_text_justification( self, value: Option<TextJustification>, ) -> TextSampleEntryBuilder<SetTextJustification<S>>
where S::TextJustification: IsUnset,

Optional (Some / Option setters). Default: <TextJustification as Default>::default().

Source

pub fn background_color( self, value: ColorRgb, ) -> TextSampleEntryBuilder<SetBackgroundColor<S>>
where S::BackgroundColor: IsUnset,

Optional (Some / Option setters). Default: <ColorRgb as Default>::default().

Source

pub fn maybe_background_color( self, value: Option<ColorRgb>, ) -> TextSampleEntryBuilder<SetBackgroundColor<S>>
where S::BackgroundColor: IsUnset,

Optional (Some / Option setters). Default: <ColorRgb as Default>::default().

Source

pub fn default_text_box( self, value: TextBox, ) -> TextSampleEntryBuilder<SetDefaultTextBox<S>>
where S::DefaultTextBox: IsUnset,

Optional (Some / Option setters). Default: <TextBox as Default>::default().

Source

pub fn maybe_default_text_box( self, value: Option<TextBox>, ) -> TextSampleEntryBuilder<SetDefaultTextBox<S>>
where S::DefaultTextBox: IsUnset,

Optional (Some / Option setters). Default: <TextBox as Default>::default().

Source

pub fn font_number(self, value: u16) -> TextSampleEntryBuilder<SetFontNumber<S>>
where S::FontNumber: IsUnset,

Optional (Some / Option setters). Default: 0.

Source

pub fn maybe_font_number( self, value: Option<u16>, ) -> TextSampleEntryBuilder<SetFontNumber<S>>
where S::FontNumber: IsUnset,

Optional (Some / Option setters). Default: 0.

Source

pub fn font_face( self, value: FontFace, ) -> TextSampleEntryBuilder<SetFontFace<S>>
where S::FontFace: IsUnset,

Optional (Some / Option setters). Default: <FontFace as Default>::default().

0 = normal text

Source

pub fn maybe_font_face( self, value: Option<FontFace>, ) -> TextSampleEntryBuilder<SetFontFace<S>>
where S::FontFace: IsUnset,

Optional (Some / Option setters). Default: <FontFace as Default>::default().

0 = normal text

Source

pub fn foreground_color( self, value: ColorRgb, ) -> TextSampleEntryBuilder<SetForegroundColor<S>>
where S::ForegroundColor: IsUnset,

Optional (Some / Option setters). Default: <ColorRgb as Default>::default().

Source

pub fn maybe_foreground_color( self, value: Option<ColorRgb>, ) -> TextSampleEntryBuilder<SetForegroundColor<S>>
where S::ForegroundColor: IsUnset,

Optional (Some / Option setters). Default: <ColorRgb as Default>::default().

Source

pub fn font_name( self, value: impl Into<String>, ) -> TextSampleEntryBuilder<SetFontName<S>>
where S::FontName: IsUnset,

Required.

Source

pub fn extensions( self, value: Vec<StsdExtension>, ) -> TextSampleEntryBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters). Default: <Vec<StsdExtension> as Default>::default().

Source

pub fn maybe_extensions( self, value: Option<Vec<StsdExtension>>, ) -> TextSampleEntryBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters). Default: <Vec<StsdExtension> as Default>::default().

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.