[][src]Struct marc::FieldRepr

pub struct FieldRepr { /* fields omitted */ }

MARC field representation

Implementations

impl FieldRepr[src]

pub fn add_subfield<Ident, D>(
    &self,
    identifier: Ident,
    f_data: D
) -> Result<FieldRepr> where
    Ident: Into<Identifier>,
    D: AsRef<[u8]>, 
[src]

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.

pub fn filter_subfields<F>(&self, mut fun: F) -> FieldRepr where
    F: FnMut(&Subfield<'_>) -> bool
[src]

Will return new FieldRepr filtered by fun.

Subfield will be removed if fun returns false on it.

pub fn get_tag(&self) -> Tag[src]

Returns tag of a field.

pub fn get_data(&self) -> &[u8][src]

Returns data of a field (no field terminator).

Trait Implementations

impl Clone for FieldRepr[src]

impl Debug for FieldRepr[src]

impl Display for FieldRepr[src]

impl Eq for FieldRepr[src]

impl<T: Into<Tag>, D: Into<Vec<u8>>> From<(T, D)> for FieldRepr[src]

impl<T, Ind, Ident, D> From<(T, Ind, Vec<(Ident, D), Global>)> for FieldRepr where
    T: Into<Tag>,
    Ind: Into<Indicator>,
    Ident: Into<Identifier>,
    D: Into<Vec<u8>>, 
[src]

impl<'a> From<Field<'a>> for FieldRepr[src]

impl Ord for FieldRepr[src]

impl PartialEq<FieldRepr> for FieldRepr[src]

impl PartialOrd<FieldRepr> for FieldRepr[src]

impl StructuralEq for FieldRepr[src]

impl StructuralPartialEq for FieldRepr[src]

Auto Trait Implementations

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.