#[non_exhaustive]#[repr(u8)]pub enum HeadingType {
None = 0,
Outline = 1,
Number = 2,
Bullet = 3,
}Expand description
Paragraph heading type for outline/numbering classification.
Controls how a paragraph participates in document outline or numbering.
Maps to the HWPX <hh:heading type="..."> attribute.
§Examples
use hwpforge_foundation::HeadingType;
assert_eq!(HeadingType::default(), HeadingType::None);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.
None = 0
No heading (body text, default).
Outline = 1
Outline heading (개요).
Number = 2
Number heading.
Bullet = 3
Bullet heading.
Implementations§
Source§impl HeadingType
impl HeadingType
Sourcepub fn to_hwpx_str(self) -> &'static str
pub fn to_hwpx_str(self) -> &'static str
Converts to the HWPX XML attribute string.
Sourcepub fn from_hwpx_str(s: &str) -> Self
pub fn from_hwpx_str(s: &str) -> Self
Parses a HWPX XML attribute string.
Trait Implementations§
Source§impl Clone for HeadingType
impl Clone for HeadingType
Source§fn clone(&self) -> HeadingType
fn clone(&self) -> HeadingType
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 Debug for HeadingType
impl Debug for HeadingType
Source§impl Default for HeadingType
impl Default for HeadingType
Source§fn default() -> HeadingType
fn default() -> HeadingType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HeadingType
impl<'de> Deserialize<'de> for HeadingType
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 HeadingType
impl Display for HeadingType
Source§impl FromStr for HeadingType
impl FromStr for HeadingType
Source§impl Hash for HeadingType
impl Hash for HeadingType
Source§impl JsonSchema for HeadingType
impl JsonSchema for HeadingType
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§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 HeadingType
impl PartialEq for HeadingType
Source§impl Serialize for HeadingType
impl Serialize for HeadingType
Source§impl TryFrom<u8> for HeadingType
impl TryFrom<u8> for HeadingType
impl Copy for HeadingType
impl Eq for HeadingType
impl StructuralPartialEq for HeadingType
Auto Trait Implementations§
impl Freeze for HeadingType
impl RefUnwindSafe for HeadingType
impl Send for HeadingType
impl Sync for HeadingType
impl Unpin for HeadingType
impl UnwindSafe for HeadingType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.