Enum xplr::compat::ContentBody
source · pub enum ContentBody {
StaticParagraph {
render: String,
},
DynamicParagraph {
render: String,
},
StaticList {
render: Vec<String>,
},
DynamicList {
render: String,
},
StaticTable {
widths: Vec<Constraint>,
col_spacing: Option<u16>,
render: Vec<Vec<String>>,
},
DynamicTable {
widths: Vec<Constraint>,
col_spacing: Option<u16>,
render: String,
},
}
Expand description
A cursed enum from crate::ui.
Variants§
StaticParagraph
A paragraph to render
DynamicParagraph
A Lua function that returns a paragraph to render
StaticList
List to render
DynamicList
A Lua function that returns lines to render
StaticTable
A table to render
DynamicTable
A Lua function that returns a table to render
Trait Implementations§
source§impl Clone for ContentBody
impl Clone for ContentBody
source§fn clone(&self) -> ContentBody
fn clone(&self) -> ContentBody
Returns a copy 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 Debug for ContentBody
impl Debug for ContentBody
source§impl<'de> Deserialize<'de> for ContentBody
impl<'de> Deserialize<'de> for ContentBody
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ContentBody
impl PartialEq for ContentBody
source§fn eq(&self, other: &ContentBody) -> bool
fn eq(&self, other: &ContentBody) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ContentBody
impl Serialize for ContentBody
impl Eq for ContentBody
impl StructuralPartialEq for ContentBody
Auto Trait Implementations§
impl Freeze for ContentBody
impl RefUnwindSafe for ContentBody
impl Send for ContentBody
impl Sync for ContentBody
impl Unpin for ContentBody
impl UnwindSafe for ContentBody
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<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
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more