pub struct InclusionPattern {
pub pattern: String,
pub require_bold: bool,
pub require_isolation: bool,
}Expand description
Inclusion pattern with per-pattern structural gates (CR-42).
Each pattern declares whether is_bold(element) and/or
is_isolated_in_leaf(element_idx) are required for promotion.
Both gates default to true — appropriate for the typical structural-label
pattern (Chapter, Article, Section labels in regulations and acts), and the
safe default for any new pattern added without thinking.
CR-42 was filed to close an rfc-quic FP where the ^section\s+\d+
inclusion pattern was firing on inline hyperlink spans (normal-weight
<span class="f4" style="color:#2222ee">Section 18</span>). With
require_bold: true, real bold UK-Acts-of-Parliament “Section 12” labels
still promote; the hyperlink span does not.
Fields§
§pattern: String§require_bold: bool§require_isolation: boolTrait Implementations§
Source§impl Clone for InclusionPattern
impl Clone for InclusionPattern
Source§fn clone(&self) -> InclusionPattern
fn clone(&self) -> InclusionPattern
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 moreSource§impl Debug for InclusionPattern
impl Debug for InclusionPattern
Source§impl<'de> Deserialize<'de> for InclusionPattern
impl<'de> Deserialize<'de> for InclusionPattern
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InclusionPattern, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InclusionPattern, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for InclusionPattern
impl Serialize for InclusionPattern
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
Auto Trait Implementations§
impl Freeze for InclusionPattern
impl RefUnwindSafe for InclusionPattern
impl Send for InclusionPattern
impl Sync for InclusionPattern
impl Unpin for InclusionPattern
impl UnsafeUnpin for InclusionPattern
impl UnwindSafe for InclusionPattern
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