#[non_exhaustive]#[repr(u8)]pub enum VerticalAlign {
Top = 0,
Center = 1,
Bottom = 2,
}Expand description
Vertical alignment of text inside a drawing shape (글상자/타원/다각형).
Maps to the HWPX <hp:drawText><hp:subList vertAlign="..."> attribute and
the HWP5 문단 리스트 헤더 (HWPTAG_LIST_HEADER) 속성 bits 5–6 (표 65):
0 = top, 1 = center, 2 = bottom. The default is VerticalAlign::Top,
matching 한컴’s default rendering (text pinned to the shape’s top edge).
This is a neutral enum shared by shape text. Table cells keep their own
crate-external TableVerticalAlign for now; unifying the two is a
follow-up concern (see ADR-008).
Display/FromStr use the HWPX wire tokens (TOP/CENTER/BOTTOM).
§Examples
use hwpforge_foundation::VerticalAlign;
use std::str::FromStr;
assert_eq!(VerticalAlign::default(), VerticalAlign::Top);
assert_eq!(VerticalAlign::Center.to_string(), "CENTER");
assert_eq!(VerticalAlign::from_str("BOTTOM").unwrap(), VerticalAlign::Bottom);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Top = 0
Align text to the top edge of the shape (default).
Center = 1
Center text vertically within the shape.
Bottom = 2
Align text to the bottom edge of the shape.
Trait Implementations§
Source§impl Clone for VerticalAlign
impl Clone for VerticalAlign
Source§fn clone(&self) -> VerticalAlign
fn clone(&self) -> VerticalAlign
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VerticalAlign
Source§impl Debug for VerticalAlign
impl Debug for VerticalAlign
Source§impl Default for VerticalAlign
impl Default for VerticalAlign
Source§fn default() -> VerticalAlign
fn default() -> VerticalAlign
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VerticalAlign
impl<'de> Deserialize<'de> for VerticalAlign
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 Display for VerticalAlign
impl Display for VerticalAlign
impl Eq for VerticalAlign
Source§impl FromStr for VerticalAlign
impl FromStr for VerticalAlign
Source§impl Hash for VerticalAlign
impl Hash for VerticalAlign
Source§impl JsonSchema for VerticalAlign
impl JsonSchema for VerticalAlign
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for VerticalAlign
impl PartialEq for VerticalAlign
Source§impl Serialize for VerticalAlign
impl Serialize for VerticalAlign
impl StructuralPartialEq for VerticalAlign
Auto Trait Implementations§
impl Freeze for VerticalAlign
impl RefUnwindSafe for VerticalAlign
impl Send for VerticalAlign
impl Sync for VerticalAlign
impl Unpin for VerticalAlign
impl UnsafeUnpin for VerticalAlign
impl UnwindSafe for VerticalAlign
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.