Struct jomini::BinaryDeserializerBuilder
source · [−]pub struct BinaryDeserializerBuilder<F> { /* private fields */ }Expand description
Build a tweaked binary deserializer
Implementations
sourceimpl<F> BinaryDeserializerBuilder<F> where
F: BinaryFlavor,
impl<F> BinaryDeserializerBuilder<F> where
F: BinaryFlavor,
sourcepub fn with_flavor(flavor: F) -> Self
pub fn with_flavor(flavor: F) -> Self
Create a new builder instance
sourcepub fn on_failed_resolve(
&mut self,
strategy: FailedResolveStrategy
) -> &mut Self
pub fn on_failed_resolve(
&mut self,
strategy: FailedResolveStrategy
) -> &mut Self
Set the behavior when a unknown token is encountered
sourcepub fn from_slice<'a, 'b, 'res: 'a, RES, T>(
&'b self,
data: &'a [u8],
resolver: &'res RES
) -> Result<T, Error> where
T: Deserialize<'a>,
RES: TokenResolver,
pub fn from_slice<'a, 'b, 'res: 'a, RES, T>(
&'b self,
data: &'a [u8],
resolver: &'res RES
) -> Result<T, Error> where
T: Deserialize<'a>,
RES: TokenResolver,
Convenience method for parsing and deserializing binary data in a single step
sourcepub fn from_tape<'a, 'b, 'c, 'res: 'a, RES, T>(
&'b self,
tape: &'c BinaryTape<'a>,
resolver: &'res RES
) -> Result<T, Error> where
T: Deserialize<'a>,
RES: TokenResolver,
pub fn from_tape<'a, 'b, 'c, 'res: 'a, RES, T>(
&'b self,
tape: &'c BinaryTape<'a>,
resolver: &'res RES
) -> Result<T, Error> where
T: Deserialize<'a>,
RES: TokenResolver,
Deserialize the given binary tape
Trait Implementations
Auto Trait Implementations
impl<F> RefUnwindSafe for BinaryDeserializerBuilder<F> where
F: RefUnwindSafe,
impl<F> Send for BinaryDeserializerBuilder<F> where
F: Send,
impl<F> Sync for BinaryDeserializerBuilder<F> where
F: Sync,
impl<F> Unpin for BinaryDeserializerBuilder<F> where
F: Unpin,
impl<F> UnwindSafe for BinaryDeserializerBuilder<F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more