[−][src]Struct genie::DRSReader
A DRS archive reader.
Implementations
impl DRSReader
[src]
pub fn new<R>(handle: &mut R) -> Result<DRSReader, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
Create a new DRS archive reader for the given handle.
The handle must be Read
able and Seek
able.
pub fn get_table(&self, resource_type: ResourceType) -> Option<&DRSTable>
[src]
Get the table for the given resource type.
pub fn get_resource(
&self,
resource_type: ResourceType,
id: u32
) -> Option<&DRSResource>
[src]
&self,
resource_type: ResourceType,
id: u32
) -> Option<&DRSResource>
Get a resource of a given type and ID.
pub fn get_resource_type(&self, id: u32) -> Option<ResourceType>
[src]
Get the type of a resource with the given ID.
pub fn get_resource_reader<R>(
&self,
handle: R,
resource_type: ResourceType,
id: u32
) -> Result<impl Read, Error> where
R: Read + Seek,
[src]
&self,
handle: R,
resource_type: ResourceType,
id: u32
) -> Result<impl Read, Error> where
R: Read + Seek,
Get a Read
er for the given resource.
It shares the file handle that is given, so make sure to use the return value before calling this method again.
pub fn read_resource<R>(
&self,
handle: &mut R,
resource_type: ResourceType,
id: u32
) -> Result<Box<[u8]>, Error> where
R: Read + Seek,
[src]
&self,
handle: &mut R,
resource_type: ResourceType,
id: u32
) -> Result<Box<[u8]>, Error> where
R: Read + Seek,
Read a file from the DRS archive.
pub fn tables(&self) -> Iter<DRSTable>
[src]
Iterate over the tables in this DRS archive.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DRSReader
impl Send for DRSReader
impl Sync for DRSReader
impl Unpin for DRSReader
impl UnwindSafe for DRSReader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,