[][src]Struct genie::DRSReader

pub struct DRSReader { /* fields omitted */ }

A DRS archive reader.

Methods

impl DRSReader[src]

pub fn new<R>(handle: &mut R) -> Result<DRSReader, Error> where
    R: Read + Seek
[src]

Create a new DRS archive reader for the given handle. The handle must be Readable and Seekable.

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]

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]

Get a Reader 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]

Read a file from the DRS archive.

pub fn tables(&self) -> Iter<DRSTable>[src]

Iterate over the tables in this DRS archive.

Trait Implementations

impl Debug for DRSReader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]