Enum kas::text::Align [−]
pub enum Align {
Default,
TL,
Centre,
BR,
Stretch,
}
Expand description
Alignment of contents
Note that alignment information is often passed as a (horiz, vert)
pair.
Variants
Default alignment
This is context dependent. For example, for Left-To-Right text it means
TL
; for things which want to stretch it may mean Stretch
.
Align to top or left
Align to centre
Align to bottom or right
Stretch to fill space
For text, this is known as “justified alignment”.
Trait Implementations
impl<'de> Deserialize<'de> for Align
impl<'de> Deserialize<'de> for Align
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Align, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Align, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl PartialOrd<Align> for Align
impl PartialOrd<Align> for Align
pub fn partial_cmp(&self, other: &Align) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Align) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralEq for Align
impl StructuralPartialEq for Align
Auto Trait Implementations
impl RefUnwindSafe for Align
impl UnwindSafe for Align
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more
Compare self to key
and return true
if they are equal.
Checks that type has a default value.