pub struct Selected<'a> {
pub template: &'a Template,
pub priority: f64,
pub branch_idx: Option<usize>,
}Expand description
Result of looking up a template: a borrow into the stylesheet’s template list plus the effective priority used to break ties.
XSLT 2.0 §6.4: when a template has a union pattern A|B, the
rule behaves as if each operand were a separate template rule
with the same body and source position. branch_idx records
which operand actually matched the node — Some(i) indexes the
flattened operand list (see pattern_branches); None
indicates a non-union pattern. xsl:next-match uses this to
pick up other branches of the same template before falling
through to templates with lower precedence/priority.
Fields§
§template: &'a Template§priority: f64§branch_idx: Option<usize>Auto Trait Implementations§
impl<'a> Freeze for Selected<'a>
impl<'a> RefUnwindSafe for Selected<'a>
impl<'a> Send for Selected<'a>
impl<'a> Sync for Selected<'a>
impl<'a> Unpin for Selected<'a>
impl<'a> UnsafeUnpin for Selected<'a>
impl<'a> UnwindSafe for Selected<'a>
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