Struct nx::file::File
[−]
[src]
pub struct File { /* fields omitted */ }
A memory-mapped NX file.
Methods
impl File
[src]
pub unsafe fn open(path: &Path) -> Result<File, Error>
[src]
Opens an NX file via memory-mapping. This also checks the magic bytes in the header.
This is unsafe because it assumes the NX file is correct and UB may occur if there are mistakes.
pub fn node_count(&self) -> u32
[src]
Number of nodes in the file
pub fn root<'a>(&'a self) -> Node<'a>
[src]
Gets the root node of the file.
pub unsafe fn get_str(&self, index: u32) -> &str
[src]
Gets the string at the specified index in the string table.
pub unsafe fn get_node(&self, index: u32) -> &Node
[src]
Gets the node data at the specified index in the node table.
pub unsafe fn get_audio(&self, index: u32, length: u32) -> &[u8]
[src]
Gets the audio data at the specified index in the node table.
pub unsafe fn get_bitmap(&self, index: u32) -> &[u8]
[src]
Gets the bitmap data at the specified index in the node table.