pub enum TextContentField {
Heading,
Chapeau,
Proviso,
Content,
Continuation,
}Expand description
The different text content fields that can be present in a legislative element
Legislative elements can have up to five distinct text fields, each serving a specific purpose in the document structure. These fields are tracked separately to enable precise change detection when comparing document versions. One of five text fields that can appear in an element:
- Heading: Opening text that appears before enumerated sub-elements
- Chapeau: A conditional or qualifying clause (often starting with “Provided that”)
- Proviso: The main text content of the element
- Content: Text that appears after all child elements
- Continuation: Text that appears after all child elements
IMPORTANT: Becuase continuations appear after child elements, the full text of some elements require child elements to be present. This makes sense, to load a full section, you need the subsections, which need paragraphs which may need clauses, etc.
Variants§
Heading
The heading or title of the element (e.g., “Agricultural Programs”)
Chapeau
Opening text that appears before enumerated sub-elements
Proviso
A conditional or qualifying clause (often starting with “Provided that”)
Content
The main text content of the element
Continuation
Text that appears after all child elements
Trait Implementations§
Source§impl Clone for TextContentField
impl Clone for TextContentField
Source§fn clone(&self) -> TextContentField
fn clone(&self) -> TextContentField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextContentField
impl Debug for TextContentField
Source§impl<'de> Deserialize<'de> for TextContentField
impl<'de> Deserialize<'de> for TextContentField
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>,
Source§impl Hash for TextContentField
impl Hash for TextContentField
Source§impl PartialEq for TextContentField
impl PartialEq for TextContentField
Source§fn eq(&self, other: &TextContentField) -> bool
fn eq(&self, other: &TextContentField) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TextContentField
impl Serialize for TextContentField
impl Copy for TextContentField
impl Eq for TextContentField
impl StructuralPartialEq for TextContentField
Auto Trait Implementations§
impl Freeze for TextContentField
impl RefUnwindSafe for TextContentField
impl Send for TextContentField
impl Sync for TextContentField
impl Unpin for TextContentField
impl UnsafeUnpin for TextContentField
impl UnwindSafe for TextContentField
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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