Struct marc::FieldRepr
[−]
[src]
pub struct FieldRepr { /* fields omitted */ }MARC field representation
Methods
impl FieldRepr[src]
fn add_subfield<Ident, D>(&self, identifier: Ident, f_data: D) -> Result<FieldRepr> where Ident: Into<Identifier>, D: AsRef<[u8]>
Will return new FieldRepr with specified subfield included.
Errors
Will return Error if resuling field length (with field terminator) is greater than 9.999 bytes.
fn filter_subfields<F>(&self, fun: F) -> FieldRepr where F: FnMut(&Subfield) -> bool
Will return new FieldRepr filtered by fun.
Subfield will be removed if fun returns false on it.
fn get_tag(&self) -> Tag
Returns tag of a field.
fn get_data(&self) -> &[u8]
Returns data of a field (no field terminator).
Trait Implementations
impl Clone for FieldRepr[src]
fn clone(&self) -> FieldRepr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Eq for FieldRepr[src]
impl PartialEq for FieldRepr[src]
fn eq(&self, __arg_0: &FieldRepr) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &FieldRepr) -> bool
This method tests for !=.
impl Ord for FieldRepr[src]
fn cmp(&self, __arg_0: &FieldRepr) -> Ordering
This method returns an Ordering between self and other. Read more
impl PartialOrd for FieldRepr[src]
fn partial_cmp(&self, __arg_0: &FieldRepr) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &FieldRepr) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &FieldRepr) -> bool
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &FieldRepr) -> bool
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &FieldRepr) -> bool
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for FieldRepr[src]
impl Display for FieldRepr[src]
impl<T, Ind, Ident, D> From<(T, Ind, Vec<(Ident, D)>)> for FieldRepr where T: Into<Tag>, Ind: Into<Indicator>, Ident: Into<Identifier>, D: Into<Vec<u8>>[src]
fn from((tag, indicator, subfields): (T, Ind, Vec<(Ident, D)>)) -> FieldRepr
Performs the conversion.