BuilderPart

Enum BuilderPart 

Source
pub enum BuilderPart<D: Display = String, _T = ()> {
    Text(Text),
    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

§

ToString(D)

An impl Display type

§

Form(FormTag)

§

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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl From<&PathBuf> for BuilderPart

Source§

fn from(value: &PathBuf) -> Self

Converts to this type from the input type.
Source§

impl From<AlignCenter> for BuilderPart

Source§

fn from(_: AlignCenter) -> Self

Converts to this type from the input type.
Source§

impl From<AlignLeft> for BuilderPart

Source§

fn from(_: AlignLeft) -> Self

Converts to this type from the input type.
Source§

impl From<AlignRight> for BuilderPart

Source§

fn from(_: AlignRight) -> Self

Converts to this type from the input type.
Source§

impl From<Builder> for BuilderPart

Source§

fn from(value: Builder) -> Self

Converts to this type from the input type.
Source§

impl<D: Display> From<D> for BuilderPart<D, D>

Source§

fn from(value: D) -> Self

Converts to this type from the input type.
Source§

impl From<FormId> for BuilderPart

Source§

fn from(value: FormId) -> Self

Converts to this type from the input type.
Source§

impl From<FormTag> for BuilderPart

Source§

fn from(value: FormTag) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<Text>> From<Ghost<T>> for BuilderPart

Source§

fn from(value: Ghost<T>) -> Self

Converts to this type from the input type.
Source§

impl From<Output> for BuilderPart

Source§

fn from(value: Output) -> Self

Converts to this type from the input type.
Source§

impl From<PathBuf> for BuilderPart

Source§

fn from(value: PathBuf) -> Self

Converts to this type from the input type.
Source§

impl From<Spacer> for BuilderPart

Source§

fn from(_: Spacer) -> Self

Converts to this type from the input type.
Source§

impl From<Text> for BuilderPart

Source§

fn from(value: Text) -> Self

Converts to this type from the input type.

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>
where D: Send, _T: Send,

§

impl<D = String, _T = ()> !Sync for BuilderPart<D, _T>

§

impl<D, _T> Unpin for BuilderPart<D, _T>
where D: Unpin, _T: Unpin,

§

impl<D = String, _T = ()> !UnwindSafe for BuilderPart<D, _T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.