pub enum Part {
Char(char),
PushForm(FormId, u8),
PopForm(FormId),
MainCaret,
ExtraCaret,
Spacer,
ToggleStart(ToggleId),
ToggleEnd(ToggleId),
SpawnedWidget(SpawnId),
ResetState,
}Expand description
A part of the Text, can be a char or a Tag.
This type is used in iteration by Uis in order to
correctly print Duat’s content. Additionally, you may be
able to tell that there is no ghost text or concealment
tags, and there is a ResetState.
That is because the Text’s iteration process automatically
gets rid of these tags, since, from the point of view of the
ui, ghost text is just regular text, while conceals are
simply the lack of text. And if the ui can handle printing
regular text, printing ghost text should be a breeze.
Variants§
Char(char)
A printed char, can be real or a Ghost
PushForm(FormId, u8)
PopForm(FormId)
MainCaret
ExtraCaret
Spacer
Add a Spacer
ToggleStart(ToggleId)
Starts a toggleable region for the given ToggleId
Not yet implemented
ToggleEnd(ToggleId)
Ends a toggleable region for the given ToggleId
Not yet implemented
SpawnedWidget(SpawnId)
A spawned Widget
ResetState
Resets all FormIds, ToggleIds and alignments
Used when a Conceal covers a large region, which Duat
optimizes by just not iterating over the Parts within.
This could skip some Tags, so this variant serves the
purpose of terminating or initiating in place of skipped
Tags
This variant does not actually represent any Tag.
Implementations§
Trait Implementations§
impl Copy for Part
impl Eq for Part
impl StructuralPartialEq for Part
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnwindSafe for Part
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.