pub struct ResourceFork<R: Read + Seek + Sized> { /* private fields */ }Expand description
Reader for reading resource forks in a structured way
Implementations§
Source§impl<Reader: Read + Seek + Sized> ResourceFork<Reader>
impl<Reader: Read + Seek + Sized> ResourceFork<Reader>
pub fn into_reader(self) -> Reader
pub fn type_list(&mut self) -> Result<Vec<FourCC>, Error>
pub fn list_resources( &mut self, resource_type: FourCC, ) -> Result<Vec<u16>, Error>
pub fn list_resources_with_name( &mut self, resource_type: FourCC, ) -> Result<Vec<(u16, Option<String>)>, Error>
pub fn read_data( &mut self, resource_type: FourCC, resource_id: u16, ) -> Result<(Vec<u8>, Option<String>), Error>
pub fn try_read_data( &mut self, resource_type: FourCC, id: u16, ) -> Result<Option<Vec<u8>>, Error>
Trait Implementations§
Source§impl<R: Read + Seek + Sized> ResourceForkReader for ResourceFork<R>
impl<R: Read + Seek + Sized> ResourceForkReader for ResourceFork<R>
fn list_types(&mut self) -> Result<HashSet<FourCC>, Error>
fn list<Rsrc: ResourceReading>(&mut self) -> Result<Vec<u16>, Error>
fn read<Rsrc: ResourceReading>(&mut self, id: u16) -> Result<Rsrc, Error>
fn try_read<Rsrc: ResourceReading>( &mut self, id: u16, ) -> Result<Option<Rsrc>, Error>
Auto Trait Implementations§
impl<R> Freeze for ResourceFork<R>where
R: Freeze,
impl<R> RefUnwindSafe for ResourceFork<R>where
R: RefUnwindSafe,
impl<R> Send for ResourceFork<R>where
R: Send,
impl<R> Sync for ResourceFork<R>where
R: Sync,
impl<R> Unpin for ResourceFork<R>where
R: Unpin,
impl<R> UnwindSafe for ResourceFork<R>where
R: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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