pub struct RawFile {
pub path: PathBuf,
pub file: Box<dyn ReadTrait>,
pub start_offset: u64,
}Fields§
§path: PathBuf§file: Box<dyn ReadTrait>§start_offset: u64Implementations§
Source§impl RawFile
impl RawFile
pub fn new<T>(path: impl AsRef<Path>, input: T) -> Selfwhere
T: ReadTrait + 'static,
pub fn seek_to_start(&mut self) -> Result<()>
pub fn with_box(file: Box<dyn ReadTrait>) -> Self
pub fn inner(&mut self) -> &mut Box<dyn ReadTrait>
pub fn subview(&mut self, offset: u64, size: u64) -> Result<Vec<u8>>
pub fn subview_until_eof(&mut self, offset: u64) -> Result<Vec<u8>>
Sourcepub fn subviews_from_strips(
&mut self,
offsets: &[u32],
sizes: &[u32],
) -> Result<Vec<Vec<u8>>>
pub fn subviews_from_strips( &mut self, offsets: &[u32], sizes: &[u32], ) -> Result<Vec<Vec<u8>>>
Helper for TIFF based files to get multiple strips at once.
pub fn as_vec(&mut self) -> Result<Vec<u8>>
pub fn stream_len(&mut self) -> Result<u64>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawFile
impl !RefUnwindSafe for RawFile
impl !Send for RawFile
impl !Sync for RawFile
impl Unpin for RawFile
impl !UnwindSafe for RawFile
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