pub struct TasdFile {
pub version: u16,
pub keylen: u8,
pub packets: Vec<Packet>,
pub path: Option<Utf8PathBuf>,
}Expand description
Represents a Tool Assisted Speedrun Dump (TASD) file.
Fields§
§version: u16§keylen: u8§packets: Vec<Packet>§path: Option<Utf8PathBuf>Implementations§
Source§impl TasdFile
impl TasdFile
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new TasdFile with a DumpCreated packet.
Sourcepub fn parse_file<P: Into<Utf8PathBuf>>(path: P) -> Result<Self, TasdError>
pub fn parse_file<P: Into<Utf8PathBuf>>(path: P) -> Result<Self, TasdError>
Attempts to parse a local file into a TasdFile.
No modifications will be made to either the local or parsed file data.
Sourcepub fn parse_slice(data: &[u8]) -> Result<Self, TasdError>
pub fn parse_slice(data: &[u8]) -> Result<Self, TasdError>
Attempts to parse a byte slice into a TasdFile.
The slice must start with a valid TASD header and must end at a packet boundary.
No modifications will be made to the parsed file data.
Trait Implementations§
impl StructuralPartialEq for TasdFile
Auto Trait Implementations§
impl Freeze for TasdFile
impl RefUnwindSafe for TasdFile
impl Send for TasdFile
impl Sync for TasdFile
impl Unpin for TasdFile
impl UnwindSafe for TasdFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more