pub enum BuilderPart<D: Display = String, _T = ()> {
Text(Text),
Builder(Builder),
ToString(D),
Form(FormTag),
AlignLeft,
AlignCenter,
AlignRight,
Spacer(PhantomData<_T>),
Ghost(Text),
}Expand description
A part to be pushed to a Builder by a macro
Variants§
Text(Text)
Text to be pushed
[!NOTE]
Every
Textstruct has a\nattached at the end, but when pushing it to aBuilder, said\nis automatically removed. If you want to keep a\nat the end, push an additional one.
Builder(Builder)
A Text Builder
Much like the Text, normally, the Builder finishes
with a \n, but when pushed to another Builder, that \n
is removed as well.
ToString(D)
An impl Display type
Form(FormTag)
A FormId
AlignLeft
Sets the alignment to the left, i.e. resets it
AlignCenter
Sets the alignment to the center
AlignRight
Sets the alignment to the right
Spacer(PhantomData<_T>)
A spacer for more advanced alignment
Ghost(Text)
Ghost Text that is separate from the real thing
Trait Implementations§
Source§impl<D: Clone + Display, _T: Clone> Clone for BuilderPart<D, _T>
impl<D: Clone + Display, _T: Clone> Clone for BuilderPart<D, _T>
Source§fn clone(&self) -> BuilderPart<D, _T>
fn clone(&self) -> BuilderPart<D, _T>
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 From<AlignCenter> for BuilderPart
impl From<AlignCenter> for BuilderPart
Source§fn from(_: AlignCenter) -> Self
fn from(_: AlignCenter) -> Self
Converts to this type from the input type.
Source§impl From<AlignLeft> for BuilderPart
impl From<AlignLeft> for BuilderPart
Source§impl From<AlignRight> for BuilderPart
impl From<AlignRight> for BuilderPart
Source§fn from(_: AlignRight) -> Self
fn from(_: AlignRight) -> Self
Converts to this type from the input type.
Source§impl From<Builder> for BuilderPart
impl From<Builder> for BuilderPart
Source§impl<D: Display> From<D> for BuilderPart<D, D>
impl<D: Display> From<D> for BuilderPart<D, D>
Source§impl From<FormId> for BuilderPart
impl From<FormId> for BuilderPart
Source§impl From<FormTag> for BuilderPart
impl From<FormTag> for BuilderPart
Source§impl From<PathBuf> for BuilderPart
impl From<PathBuf> for BuilderPart
Source§impl From<PathKind> for BuilderPart
impl From<PathKind> for BuilderPart
Source§impl From<Spacer> for BuilderPart
impl From<Spacer> for BuilderPart
Auto Trait Implementations§
impl<D, _T> Freeze for BuilderPart<D, _T>where
D: Freeze,
impl<D = String, _T = ()> !RefUnwindSafe for BuilderPart<D, _T>
impl<D, _T> Send for BuilderPart<D, _T>
impl<D = String, _T = ()> !Sync for BuilderPart<D, _T>
impl<D, _T> Unpin for BuilderPart<D, _T>
impl<D = String, _T = ()> !UnwindSafe for BuilderPart<D, _T>
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.