pub struct SemanticRole {
pub category: RoleCategory,
pub subcategory: Option<String>,
pub qualifier: Option<String>,
}Expand description
Semantic role in document structure
Fields§
§category: RoleCategoryPrimary category
subcategory: Option<String>Subcategory (optional)
qualifier: Option<String>Custom qualifier
Implementations§
Source§impl SemanticRole
impl SemanticRole
pub fn new(category: RoleCategory) -> Self
pub fn with_subcategory(self, sub: impl Into<String>) -> Self
pub fn with_qualifier(self, qual: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for SemanticRole
impl Clone for SemanticRole
Source§fn clone(&self) -> SemanticRole
fn clone(&self) -> SemanticRole
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 SemanticRole
impl Debug for SemanticRole
Source§impl<'de> Deserialize<'de> for SemanticRole
impl<'de> Deserialize<'de> for SemanticRole
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 SemanticRole
impl Display for SemanticRole
Source§impl Hash for SemanticRole
impl Hash for SemanticRole
Source§impl PartialEq for SemanticRole
impl PartialEq for SemanticRole
Source§impl Serialize for SemanticRole
impl Serialize for SemanticRole
impl Eq for SemanticRole
impl StructuralPartialEq for SemanticRole
Auto Trait Implementations§
impl Freeze for SemanticRole
impl RefUnwindSafe for SemanticRole
impl Send for SemanticRole
impl Sync for SemanticRole
impl Unpin for SemanticRole
impl UnwindSafe for SemanticRole
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