pub enum DataSource<'a> {
Owned(Vec<u8>),
Ref(&'a [u8]),
File(File, u64),
}
Expand description
The source of data for given metadata or chunk.
Variants§
Owned(Vec<u8>)
Data owned in the data source.
Ref(&'a [u8])
Data referred to by the data source.
File(File, u64)
An open file and the length of the data contained within it.
Implementations§
Source§impl<'a> DataSource<'a>
impl<'a> DataSource<'a>
Trait Implementations§
Source§impl<'a> Debug for DataSource<'a>
impl<'a> Debug for DataSource<'a>
Source§impl<'a> TryInto<DataSource<'a>> for &[u8]
impl<'a> TryInto<DataSource<'a>> for &[u8]
Source§impl<'a> TryInto<DataSource<'a>> for &Path
impl<'a> TryInto<DataSource<'a>> for &Path
Source§impl<'a> TryInto<DataSource<'a>> for &str
impl<'a> TryInto<DataSource<'a>> for &str
Source§impl<'a> TryInto<DataSource<'a>> for PathBuf
impl<'a> TryInto<DataSource<'a>> for PathBuf
Source§impl<'a> TryInto<DataSource<'a>> for String
impl<'a> TryInto<DataSource<'a>> for String
Auto Trait Implementations§
impl<'a> Freeze for DataSource<'a>
impl<'a> RefUnwindSafe for DataSource<'a>
impl<'a> Send for DataSource<'a>
impl<'a> Sync for DataSource<'a>
impl<'a> Unpin for DataSource<'a>
impl<'a> UnwindSafe for DataSource<'a>
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