Struct srx::SRX [−][src]
The SRX root. Does not execute rules on is own.
Implementations
impl SRX
[src]
pub fn from_reader<R: Read>(reader: R) -> Result<Self, Error>
[src]
This is supported on crate feature
from_xml
only.Creates a new SRX struct from a reader.
Errors
- If the file is not in valid SRX format.
- If an unsupported rule is encountered in the
<maprules>
.
impl SRX
[src]
pub fn language_rules<S: AsRef<str>>(&self, lang_code: S) -> Rules
[src]
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.
pub fn errors(&self) -> &HashMap<Language, Vec<String>>
[src]
Maps Languages to a vector of string representations of errors which occured during parsing regular expressions for this language.
Trait Implementations
impl Clone for SRX
[src]
impl Debug for SRX
[src]
impl<'de> Deserialize<'de> for SRX
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl FromStr for SRX
[src]
This is supported on crate feature
from_xml
only.type Err = Error
The associated error which can be returned from parsing.
fn from_str(string: &str) -> Result<Self, Self::Err>
[src]
impl Serialize for SRX
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,