Skip to main content

CodePreviewPropsBuilder

Struct CodePreviewPropsBuilder 

Source
pub struct CodePreviewPropsBuilder {
    pub id: Option<Option<FocusId>>,
    pub value: Option<Option<CodeBinding>>,
    pub code: Option<Option<String>>,
    pub language: Option<Option<String>>,
    pub theme: Option<Option<String>>,
    pub show_line_numbers: Option<bool>,
    pub width: Option<Dimension>,
    pub height: Option<Dimension>,
    pub border: Option<BorderStyle>,
    pub border_color: Option<Option<Color>>,
    pub title: Option<Option<String>>,
    pub tab_size: Option<usize>,
}

Fields§

§id: Option<Option<FocusId>>§value: Option<Option<CodeBinding>>§code: Option<Option<String>>§language: Option<Option<String>>§theme: Option<Option<String>>§show_line_numbers: Option<bool>§width: Option<Dimension>§height: Option<Dimension>§border: Option<BorderStyle>§border_color: Option<Option<Color>>§title: Option<Option<String>>§tab_size: Option<usize>

Implementations§

Source§

impl CodePreviewPropsBuilder

Source

pub fn id(self, val: impl IntoPropOption<FocusId>) -> Self

Source

pub fn opt_id(self, val: Option<FocusId>) -> Self

Source

pub fn value(self, val: impl IntoPropOption<CodeBinding>) -> Self

Source

pub fn opt_value(self, val: Option<CodeBinding>) -> Self

Source

pub fn code(self, val: impl IntoPropOption<String>) -> Self

Source

pub fn opt_code(self, val: Option<String>) -> Self

Source

pub fn language(self, val: impl IntoPropOption<String>) -> Self

Source

pub fn opt_language(self, val: Option<String>) -> Self

Source

pub fn theme(self, val: impl IntoPropOption<String>) -> Self

Source

pub fn opt_theme(self, val: Option<String>) -> Self

Source

pub fn show_line_numbers(self, val: impl Into<bool>) -> Self

Source

pub fn width(self, val: impl IntoDimension) -> Self

Source

pub fn height(self, val: impl IntoDimension) -> Self

Source

pub fn border(self, val: impl Into<BorderStyle>) -> Self

Source

pub fn border_color(self, val: impl IntoPropOption<Color>) -> Self

Source

pub fn opt_border_color(self, val: Option<Color>) -> Self

Source

pub fn title(self, val: impl IntoPropOption<String>) -> Self

Source

pub fn opt_title(self, val: Option<String>) -> Self

Source

pub fn tab_size(self, val: impl Into<usize>) -> Self

Source

pub fn build(self) -> CodePreviewProps

Trait Implementations§

Source§

impl Default for CodePreviewPropsBuilder

Source§

fn default() -> Self

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

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.