Struct pica_record::primitives::Record
source · pub struct Record(/* private fields */);
Expand description
A mutable record.
Implementations§
source§impl Record
impl Record
sourcepub fn write_to(&self, out: &mut impl Write) -> Result<()>
pub fn write_to(&self, out: &mut impl Write) -> Result<()>
Write the record into the given writer.
§Example
use std::io::Cursor;
use pica_record::primitives::{Record, RecordRef};
let mut writer = Cursor::new(Vec::<u8>::new());
let record: Record =
RecordRef::from_bytes(b"003@ \x1f0a\x1e\n")?.into();
record.write_to(&mut writer);
assert_eq!(
String::from_utf8(writer.into_inner())?,
"003@ \x1f0a\x1e\n"
);
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)