pub struct EditorConfig {Show 13 fields
pub tab_size: usize,
pub insert_spaces: bool,
pub word_wrap: bool,
pub show_line_numbers: bool,
pub highlight_current_line: bool,
pub show_whitespace: bool,
pub match_brackets: bool,
pub auto_indent: bool,
pub auto_close_brackets: bool,
pub font_size: f32,
pub line_height: f32,
pub max_line_width: usize,
pub read_only: bool,
}Available on crate feature
editor only.Expand description
Editor configuration options.
Fields§
§tab_size: usizeTab size in spaces
insert_spaces: boolWhether to insert spaces instead of tabs
word_wrap: boolWhether word wrap is enabled
show_line_numbers: boolWhether to show line numbers
highlight_current_line: boolWhether to highlight the current line
show_whitespace: boolWhether to show whitespace characters
match_brackets: boolWhether bracket matching is enabled
auto_indent: boolWhether auto-indent is enabled
auto_close_brackets: boolWhether auto-close brackets is enabled
font_size: f32Font size in pixels
line_height: f32Line height multiplier (1.0 = same as font size)
max_line_width: usizeMaximum line width (0 = no limit)
read_only: boolWhether the editor is read-only
Trait Implementations§
Source§impl Clone for EditorConfig
impl Clone for EditorConfig
Source§fn clone(&self) -> EditorConfig
fn clone(&self) -> EditorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EditorConfig
impl Debug for EditorConfig
Source§impl Default for EditorConfig
impl Default for EditorConfig
Source§impl<'de> Deserialize<'de> for EditorConfig
impl<'de> Deserialize<'de> for EditorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EditorConfig
impl RefUnwindSafe for EditorConfig
impl Send for EditorConfig
impl Sync for EditorConfig
impl Unpin for EditorConfig
impl UnwindSafe for EditorConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
Source§fn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
Tries to deserialize the data, given only the
submit event.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.