Struct respk::Resource [−][src]
pub struct Resource { /* fields omitted */ }
A decompressed resource.
Methods
impl Resource
[src]
impl Resource
pub fn contents(&self) -> &[u8]
[src]
pub fn contents(&self) -> &[u8]
Get the contents of the resource.
pub fn contents_str(&self) -> Result<&str, Utf8Error>
[src]
pub fn contents_str(&self) -> Result<&str, Utf8Error>
Get the contents of the resource as a string.
Methods from Deref<Target = ResourceInfo>
pub fn path(&self) -> &str
[src]
pub fn path(&self) -> &str
Get the path of the resource.
pub fn size(&self) -> u32
[src]
pub fn size(&self) -> u32
Get the full size of the resource contents.
pub fn compressed_size(&self) -> u32
[src]
pub fn compressed_size(&self) -> u32
Get the compressed size of the resource.
Trait Implementations
impl Debug for Resource
[src]
impl Debug for Resource
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Deref for Resource
[src]
impl Deref for Resource
type Target = ResourceInfo
The resulting type after dereferencing.
fn deref(&self) -> &ResourceInfo
[src]
fn deref(&self) -> &ResourceInfo
Dereferences the value.