[][src]Struct marc::Record

pub struct Record<'a> { /* fields omitted */ }

Parsed MARC Record.

It could be borrowed if it was parsed from a buffer or it could be owned if it was read from an io::Read implementor.

Implementations

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

pub fn parse(input: &[u8]) -> Result<Record<'_>>[src]

Will try to parse record from a buffer.

Will borrow an input for the lifetime of a produced record.

pub fn from_vec<I>(input: I) -> Result<Record<'static>> where
    I: Into<Vec<u8>>, 
[src]

Will crate owned record from vector of bytes.

Panic

Will check that input length equals the record length.

pub fn read<T: Read>(input: &mut T) -> Result<Option<Record<'static>>>[src]

Will try to read a Record from an io::Read implementor.

Will return None if reader is empty.

pub fn field<T: Into<Tag>>(&self, tag: T) -> Vec<Field<'_>>[src]

Will return fields with tag == Tag

pub fn fields(&self) -> Fields<'_>

Notable traits for Fields<'a>

impl<'a> Iterator for Fields<'a> type Item = Field<'a>;
[src]

Will return iterator over fields of a record

pub fn record_status(&self) -> RecordStatus[src]

pub fn type_of_record(&self) -> TypeOfRecord[src]

pub fn bibliographic_level(&self) -> BibliographicLevel[src]

pub fn type_of_control(&self) -> TypeOfControl[src]

pub fn character_coding_scheme(&self) -> CharacterCodingScheme[src]

pub fn encoding_level(&self) -> EncodingLevel[src]

pub fn descriptive_cataloging_form(&self) -> DescriptiveCatalogingForm[src]

pub fn multipart_resource_record_level(&self) -> MultipartResourceRecordLevel[src]

Trait Implementations

impl AsRef<[u8]> for Record<'_>[src]

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

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

impl<'a> Display for Record<'a>[src]

impl<'a> Eq for Record<'a>[src]

impl<'a> PartialEq<Record<'a>> for Record<'a>[src]

impl<'a> StructuralEq for Record<'a>[src]

impl<'a> StructuralPartialEq for Record<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Record<'a>[src]

impl<'a> Send for Record<'a>[src]

impl<'a> Sync for Record<'a>[src]

impl<'a> Unpin for Record<'a>[src]

impl<'a> UnwindSafe for Record<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.