pub struct Descriptor {
pub props: Props,
pub classes: Vec<String>,
pub style: Style,
pub role: Option<Role>,
pub name: Option<String>,
pub focus: FocusMode,
pub item: Option<ItemPosition>,
pub options: Options,
pub semantics: Option<Box<Semantics>>,
}Fields§
§props: Props§classes: Vec<String>§style: Style§role: Option<Role>§name: Option<String>§focus: FocusMode§item: Option<ItemPosition>§options: Options§semantics: Option<Box<Semantics>>Implementations§
Source§impl Descriptor
impl Descriptor
pub fn view(&self) -> DescriptorView<'_>
pub fn semantic_id(&self) -> Option<&SemanticId>
pub fn activation_enabled(&self) -> bool
pub fn readonly(&self) -> bool
pub fn field_part(&self) -> Option<FieldPart>
pub fn document_part(&self) -> Option<DocumentPart>
pub fn effective_role(&self) -> Option<Role>
pub fn validate(&self) -> Result<(), Error>
pub fn new(props: Props) -> Self
Sourcepub fn normalize_input(&mut self) -> Result<(), Error>
pub fn normalize_input(&mut self) -> Result<(), Error>
Canonicalize stored editable text without changing a program’s explicit revision. Single-line declarations retain their line-break diagnostic.
Sourcepub fn patch(&mut self, patch: Patch) -> Result<(), Error>
pub fn patch(&mut self, patch: Patch) -> Result<(), Error>
Validate before replacing the live descriptor. An invalid patch does not partially corrupt a node even though a mutation batch is not atomic.
pub fn patched(&self, patch: Patch) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for Descriptor
impl Clone for Descriptor
Source§impl Debug for Descriptor
impl Debug for Descriptor
Source§impl Default for Descriptor
impl Default for Descriptor
Source§impl<'a> From<&'a Box<Descriptor>> for DescriptorView<'a>
impl<'a> From<&'a Box<Descriptor>> for DescriptorView<'a>
Source§fn from(d: &'a Box<Descriptor>) -> Self
fn from(d: &'a Box<Descriptor>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a Descriptor> for DescriptorView<'a>
impl<'a> From<&'a Descriptor> for DescriptorView<'a>
Source§fn from(d: &'a Descriptor) -> Self
fn from(d: &'a Descriptor) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Descriptor
impl PartialEq for Descriptor
Source§impl PartialEq<Descriptor> for LiveDescriptor
impl PartialEq<Descriptor> for LiveDescriptor
Source§impl PartialEq<Descriptor> for DescriptorView<'_>
impl PartialEq<Descriptor> for DescriptorView<'_>
Source§impl PartialEq<DescriptorView<'_>> for Descriptor
impl PartialEq<DescriptorView<'_>> for Descriptor
Source§impl PartialEq<LiveDescriptor> for Descriptor
impl PartialEq<LiveDescriptor> for Descriptor
impl StructuralPartialEq for Descriptor
Auto Trait Implementations§
impl !RefUnwindSafe for Descriptor
impl !Send for Descriptor
impl !Sync for Descriptor
impl !UnwindSafe for Descriptor
impl Forget for Descriptor
impl Freeze for Descriptorwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const RcInner<Vec<SelectEntry>> is !null: Freeze,
PhantomData<RcInner<Vec<SelectEntry>>>: Freeze,
PhantomData<SemanticId>: Freeze,
PhantomData<FileFilter>: Freeze,
*const RcInner<RichDocument> is !null: Freeze,
PhantomData<RcInner<RichDocument>>: Freeze,
PhantomData<ImageCandidate>: Freeze,
PhantomData<ImageSizeHint>: Freeze,
PhantomData<PathCommand>: Freeze,
PhantomData<String>: Freeze,
PhantomData<GridTrack>: Freeze,
PhantomData<Color>: Freeze,
PhantomData<Family>: Freeze,
PhantomData<(TypeId, Rc<dyn Any>)>: Freeze,
*const Semantics is !null: Freeze,
PhantomData<Semantics>: Freeze,
impl Move for Descriptor
impl Unpin for Descriptor
impl UnsafeUnpin for Descriptorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<Vec<SelectEntry>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<SelectEntry>>>: UnsafeUnpin,
PhantomData<SemanticId>: UnsafeUnpin,
PhantomData<FileFilter>: UnsafeUnpin,
*const RcInner<RichDocument> is !null: UnsafeUnpin,
PhantomData<RcInner<RichDocument>>: UnsafeUnpin,
PhantomData<ImageCandidate>: UnsafeUnpin,
PhantomData<ImageSizeHint>: UnsafeUnpin,
PhantomData<PathCommand>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<GridTrack>: UnsafeUnpin,
PhantomData<Color>: UnsafeUnpin,
PhantomData<Family>: UnsafeUnpin,
PhantomData<(TypeId, Rc<dyn Any>)>: UnsafeUnpin,
*const Semantics is !null: UnsafeUnpin,
PhantomData<Semantics>: UnsafeUnpin,
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