pub struct DatFileParser { /* private fields */ }Implementations§
Source§impl DatFileParser
impl DatFileParser
Sourcepub fn parse(&self, input: &[u8]) -> Result<Battle, Error>
pub fn parse(&self, input: &[u8]) -> Result<Battle, Error>
Parse a datfile into a Battle struct
Sourcepub fn parse_intercept(
&self,
input: &[u8],
intercept: InterceptFn,
) -> Result<Battle, Error>
pub fn parse_intercept( &self, input: &[u8], intercept: InterceptFn, ) -> Result<Battle, Error>
Same as parse but takes a function that you can use to implement your own parsing code to convert a
pickle value to its JSON counterpart
Auto Trait Implementations§
impl Freeze for DatFileParser
impl RefUnwindSafe for DatFileParser
impl Send for DatFileParser
impl Sync for DatFileParser
impl Unpin for DatFileParser
impl UnwindSafe for DatFileParser
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more