[−][src]Struct marc::FieldRepr
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]
&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.
pub fn filter_subfields<F>(&self, mut fun: F) -> FieldRepr where
F: FnMut(&Subfield<'_>) -> bool,
[src]
F: FnMut(&Subfield<'_>) -> bool,
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]
T: Into<Tag>,
Ind: Into<Indicator>,
Ident: Into<Identifier>,
D: Into<Vec<u8>>,
impl<'a> From<Field<'a>> for FieldRepr
[src]
impl Ord for FieldRepr
[src]
fn cmp(&self, other: &FieldRepr) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<FieldRepr> for FieldRepr
[src]
impl PartialOrd<FieldRepr> for FieldRepr
[src]
fn partial_cmp(&self, other: &FieldRepr) -> Option<Ordering>
[src]
fn lt(&self, other: &FieldRepr) -> bool
[src]
fn le(&self, other: &FieldRepr) -> bool
[src]
fn gt(&self, other: &FieldRepr) -> bool
[src]
fn ge(&self, other: &FieldRepr) -> bool
[src]
impl StructuralEq for FieldRepr
[src]
impl StructuralPartialEq for FieldRepr
[src]
Auto Trait Implementations
impl RefUnwindSafe for FieldRepr
[src]
impl Send for FieldRepr
[src]
impl Sync for FieldRepr
[src]
impl Unpin for FieldRepr
[src]
impl UnwindSafe for FieldRepr
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,