pub struct Row<T> {
pub key: String,
pub record: T,
}Expand description
Struct representing a row of the OpenLibrary dump file.
The row extracts the key and record, deserializing the record from JSON to the appropriate type.
Fields§
§key: String§record: TTrait Implementations§
Source§impl<T: DeserializeOwned> FromStr for Row<T>
impl<T: DeserializeOwned> FromStr for Row<T>
Source§impl ObjectWriter<Row<OLAuthorSource>> for AuthorProcessor
impl ObjectWriter<Row<OLAuthorSource>> for AuthorProcessor
Source§fn write_object(&mut self, row: Row<OLAuthorSource>) -> Result<()>
fn write_object(&mut self, row: Row<OLAuthorSource>) -> Result<()>
Write one object.
Source§fn finish_objects(self) -> Result<usize>
fn finish_objects(self) -> Result<usize>
Finish and close the target.
Source§impl ObjectWriter<Row<OLEditionRecord>> for EditionProcessor
impl ObjectWriter<Row<OLEditionRecord>> for EditionProcessor
Source§fn write_object(&mut self, row: Row<OLEditionRecord>) -> Result<()>
fn write_object(&mut self, row: Row<OLEditionRecord>) -> Result<()>
Write one object.
Source§fn finish_objects(self) -> Result<usize>
fn finish_objects(self) -> Result<usize>
Finish and close the target.
Source§impl ObjectWriter<Row<OLWorkRecord>> for WorkProcessor
impl ObjectWriter<Row<OLWorkRecord>> for WorkProcessor
Source§fn write_object(&mut self, row: Row<OLWorkRecord>) -> Result<()>
fn write_object(&mut self, row: Row<OLWorkRecord>) -> Result<()>
Write one object.
Source§fn finish_objects(self) -> Result<usize>
fn finish_objects(self) -> Result<usize>
Finish and close the target.
Auto Trait Implementations§
impl<T> Freeze for Row<T>where
T: Freeze,
impl<T> RefUnwindSafe for Row<T>where
T: RefUnwindSafe,
impl<T> Send for Row<T>where
T: Send,
impl<T> Sync for Row<T>where
T: Sync,
impl<T> Unpin for Row<T>where
T: Unpin,
impl<T> UnwindSafe for Row<T>where
T: UnwindSafe,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more