pub struct Item {
pub source: PathBuf,
pub relative: PathBuf,
pub size: u64,
pub kind: ItemKind,
pub convert: Option<Target>,
pub contents: Option<String>,
}Expand description
One file to write, and where.
Fields§
§source: PathBufWhere it is read from.
relative: PathBufWhere it goes, relative to the destination folder.
Relative rather than absolute so the plan can be compared, printed and tested without knowing which drive it is bound for.
size: u64Bytes, as the catalog last read them — or an estimate when this item is to be converted, since what an encoder produces is not known until it has produced it.
kind: ItemKindWhy it is here.
convert: Option<Target>What to encode it into, or None to copy the bytes as they are.
contents: Option<String>UTF-8 derivative text to write instead of copying source bytes. Set only when destination playlists have explicitly been requested.
Trait Implementations§
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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