pub struct IndicatorValidator { /* private fields */ }Expand description
Validator for MARC field indicators
Implementations§
Source§impl IndicatorValidator
impl IndicatorValidator
Sourcepub fn validate_field(&self, field: &Field) -> Result<()>
pub fn validate_field(&self, field: &Field) -> Result<()>
Validate a field’s indicators
§Errors
Returns Err if indicators don’t meet validation rules for this field tag.
Sourcepub fn validate_indicators(
&self,
tag: &str,
indicator1: char,
indicator2: char,
) -> Result<()>
pub fn validate_indicators( &self, tag: &str, indicator1: char, indicator2: char, ) -> Result<()>
Validate indicators for a specific tag
§Errors
Returns Err if indicators don’t meet validation rules.
Sourcepub fn get_indicator_meaning(
&self,
tag: &str,
indicator_num: u8,
value: char,
) -> Option<String>
pub fn get_indicator_meaning( &self, tag: &str, indicator_num: u8, value: char, ) -> Option<String>
Get the semantic meaning of an indicator value for a field
Returns the human-readable meaning if available, or None if the indicator
is semantic or not defined for this field.
Sourcepub fn get_indicator_meanings(
&self,
tag: &str,
indicator_num: u8,
) -> Vec<IndicatorMeaning>
pub fn get_indicator_meanings( &self, tag: &str, indicator_num: u8, ) -> Vec<IndicatorMeaning>
Get all semantic meanings for a field’s indicator
Returns a vector of (value, meaning) pairs for a given field indicator.
Sourcepub fn get_rules(&self, tag: &str) -> Option<&IndicatorRules>
pub fn get_rules(&self, tag: &str) -> Option<&IndicatorRules>
Get the validation rules for a tag
Trait Implementations§
Source§impl Debug for IndicatorValidator
impl Debug for IndicatorValidator
Auto Trait Implementations§
impl Freeze for IndicatorValidator
impl RefUnwindSafe for IndicatorValidator
impl Send for IndicatorValidator
impl Sync for IndicatorValidator
impl Unpin for IndicatorValidator
impl UnwindSafe for IndicatorValidator
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
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>
Converts
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>
Converts
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