pub struct SRX { /* private fields */ }
Expand description
The SRX root. Does not execute rules on is own.
Implementations§
source§impl SRX
impl SRX
sourcepub fn language_rules<S: AsRef<str>>(&self, lang_code: S) -> Rules
pub fn language_rules<S: AsRef<str>>(&self, lang_code: S) -> Rules
Gets the rules for a language code by
- aggregating rules from all Languages with a matching
<languagepattern>
(if the SRX is set to be cascading) - finding the first matching
<languagepattern>
(if the SRX is set to be not cascading)
Result should be cached instead of calling this repeatedly as it clones the rules.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SRX
impl<'de> Deserialize<'de> for SRX
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
Auto Trait Implementations§
impl RefUnwindSafe for SRX
impl Send for SRX
impl Sync for SRX
impl Unpin for SRX
impl UnwindSafe for SRX
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