pub trait Resource {
    type Index: Read + Seek;
    type Index2: Read + Seek;
    type Dat: Read + Seek;

    fn path_metadata(&self, path: &str) -> Option<(u8, u8)>;
    fn version(&self, repository: u8) -> Result<String, Error>;
    fn index(
        &self,
        repository: u8,
        category: u8,
        chunk: u8
    ) -> Result<Self::Index, Error>; fn index2(
        &self,
        repository: u8,
        category: u8,
        chunk: u8
    ) -> Result<Self::Index2, Error>; fn dat(
        &self,
        repository: u8,
        category: u8,
        chunk: u8,
        dat: u8
    ) -> Result<Self::Dat, Error>; }
Available on crate feature sqpack only.
Expand description

Resource adapter to fetch information and data on request for a SqPack instance.

Required Associated Types

The type of an index resource.

The type of an index2 resource.

The type of a dat resource.

Required Methods

Retrieve the (repository, category) for a given SqPack path, or None if the path is invalid or does not conform to valid formatting for this resource.

Get the version string for a given repository.

Fetches the specified index resource.

Fetches the specified index2 resource.

Fetches the specified dat resource.

Implementors