[−][src]Struct genie_drs::DRSReader
A DRS archive reader.
Methods
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 read_resource<R: Read + Seek>(
&self,
handle: &mut R,
resource_type: ResourceType,
id: u32
) -> Result<Box<[u8]>, Error>
[src]
&self,
handle: &mut R,
resource_type: ResourceType,
id: u32
) -> Result<Box<[u8]>, Error>
Read a file from the DRS archive.
pub fn tables(&self) -> DRSTableIterator
[src]
Iterate over the tables in this DRS archive.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,