Skip to main content

CodeEditorPropsBuilder

Struct CodeEditorPropsBuilder 

Source
pub struct CodeEditorPropsBuilder {
Show 14 fields pub id: Option<Option<FocusId>>, pub value: Option<Bindable<String>>, pub default_value: Option<Option<String>>, pub on_value_change: Option<Option<Rc<dyn Fn(String)>>>, pub placeholder: 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 title: Option<Option<String>>, pub tab_size: Option<usize>, pub autofocus: Option<bool>, pub cursor_style: Option<CursorStyle>,
}

Fields§

§id: Option<Option<FocusId>>§value: Option<Bindable<String>>§default_value: Option<Option<String>>§on_value_change: Option<Option<Rc<dyn Fn(String)>>>§placeholder: Option<String>§language: Option<Option<String>>§theme: Option<Option<String>>§show_line_numbers: Option<bool>§width: Option<Dimension>§height: Option<Dimension>§title: Option<Option<String>>§tab_size: Option<usize>§autofocus: Option<bool>§cursor_style: Option<CursorStyle>

Implementations§

Source§

impl CodeEditorPropsBuilder

Source

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

Source

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

Source

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

Source

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

Source

pub fn on_value_change( self, val: impl IntoPropOption<Rc<dyn Fn(String)>>, ) -> Self

Source

pub fn placeholder(self, val: impl Into<String>) -> Self

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn autofocus(self, val: bool) -> Self

Source

pub fn cursor_style(self, val: impl Into<CursorStyle>) -> Self

Source

pub fn build(self) -> CodeEditorProps

Trait Implementations§

Source§

impl Default for CodeEditorPropsBuilder

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.