Struct marc::Field [] [src]

pub struct Field<'a> {
    // some fields omitted
}

Borrowed version of a field of a record.

Methods

impl<'a> Field<'a>
[src]

fn is_data_field(&self) -> bool

Returns true if self is data field.

fn is_control_field(&self) -> bool

Returns true if self is control field.

fn get_subfield<'f, T: Into<Identifier>>(&'f self, ident: T) -> Vec<Subfield<'f>>

Returns subfields with identifier ident or empty vec if no such subfields.

fn subfields<'f>(&'f self) -> Subfields<'f>

Returns iterator over subfields of a data field.

fn get_indicator<T: From<Indicator>>(&self) -> Option<T>

Returns indictor of data field or None if self is control field.

fn get_data<T: FromFieldData + ?Sized>(&self) -> Option<&T>

Returns data of a control field or None if self is data field.

fn get_tag<T: From<&'a Tag>>(&'a self) -> T

Returns tag of a field.

Trait Implementations

impl<'a> Clone for Field<'a>
[src]

fn clone(&self) -> Field<'a>

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<'a> PartialEq for Field<'a>
[src]

fn eq(&self, __arg_0: &Field<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Field<'a>) -> bool

This method tests for !=.

impl<'a> Debug for Field<'a>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.