pub struct CodeEditorProps {
pub value: String,
pub on_change: EventHandler<String>,
pub language: Language,
pub placeholder: String,
pub readonly: bool,
pub language_server: bool,
pub stylesheet: bool,
pub status: Option<Signal<EditorStatus>>,
}Expand description
Properties for the CodeEditor component.
Fields§
§value: String§on_change: EventHandler<String>§language: Language§placeholder: String§readonly: bool§language_server: boolRun the language’s service over the source — the LOGOS language server, or the Hardware
specs’ own (hardware_spec): a VS Code-style hover for the word under a resting pointer,
and squiggles under the problems it finds.
stylesheet: boolInline CODE_EDITOR_STYLE ahead of the editor. A host that sets editors into its own
markup places the stylesheet once, ahead of that markup, and turns this off.
status: Option<Signal<EditorStatus>>Where to tell a status bar where the caret is, what is selected, and how many problems the language service found.
Implementations§
Source§impl CodeEditorProps
impl CodeEditorProps
Sourcepub fn builder() -> CodeEditorPropsBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> CodeEditorPropsBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building CodeEditorProps.
On the builder, call .value(...), .on_change(...), .language(...), .placeholder(...)(optional), .readonly(...)(optional), .language_server(...)(optional), .stylesheet(...)(optional), .status(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CodeEditorProps.
Trait Implementations§
Source§impl Clone for CodeEditorProps
impl Clone for CodeEditorProps
Source§impl PartialEq for CodeEditorProps
impl PartialEq for CodeEditorProps
Source§impl Properties for CodeEditorPropswhere
Self: Clone,
impl Properties for CodeEditorPropswhere
Self: Clone,
Source§type Builder = CodeEditorPropsBuilder<((), (), (), (), (), (), (), ())>
type Builder = CodeEditorPropsBuilder<((), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Auto Trait Implementations§
impl Freeze for CodeEditorProps
impl !RefUnwindSafe for CodeEditorProps
impl !Send for CodeEditorProps
impl !Sync for CodeEditorProps
impl Unpin for CodeEditorProps
impl UnsafeUnpin for CodeEditorProps
impl !UnwindSafe for CodeEditorProps
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.