pub struct Reader<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
pub fn new(buf: &'a [u8], order: ByteOrder) -> Self
pub fn get_offset(&self) -> usize
pub fn set_offset(&mut self, offset: usize) -> UnityResult<usize>
pub fn set_little_order(&mut self)
pub fn set_big_order(&mut self)
pub fn len(&self) -> usize
pub fn get_order(&self) -> ByteOrder
pub fn has_space(&self, length: usize) -> UnityResult<usize>
pub fn align(&mut self, num: usize) -> UnityResult<usize>
pub fn read_u8_slice(&mut self, length: usize) -> UnityResult<&[u8]>
pub fn read_u8_array<const N: usize>(&mut self) -> UnityResult<[u8; N]>
pub fn read_f32_array<const N: usize>(&mut self) -> UnityResult<[f32; N]>
pub fn read_i32_array<const N: usize>(&mut self) -> UnityResult<[i32; N]>
pub fn read_u8_list(&mut self, length: usize) -> UnityResult<Vec<u8>>
pub fn read_u8(&mut self) -> UnityResult<u8>
pub fn read_bool(&mut self) -> UnityResult<bool>
pub fn read_u16(&mut self) -> UnityResult<u16>
pub fn read_u32(&mut self) -> UnityResult<u32>
pub fn read_u64(&mut self) -> UnityResult<u64>
pub fn read_i8(&mut self) -> UnityResult<i8>
pub fn read_i16(&mut self) -> UnityResult<i16>
pub fn read_i32(&mut self) -> UnityResult<i32>
pub fn read_i64(&mut self) -> UnityResult<i64>
pub fn read_f32(&mut self) -> UnityResult<f32>
pub fn read_f64(&mut self) -> UnityResult<f64>
pub fn read_7bit_u32(&mut self) -> UnityResult<u32>
pub fn read_string_util_null(&mut self) -> UnityResult<String>
pub fn read_string_util_null_with_limit( &mut self, limit: usize, ) -> UnityResult<String>
pub fn read_string_with_length(&mut self, length: usize) -> UnityResult<String>
pub fn read_string_with_7bit_length(&mut self) -> UnityResult<String>
pub fn read_aligned_string(&mut self) -> UnityResult<String>
pub fn read_i32_list(&mut self, length: usize) -> UnityResult<Vec<i32>>
pub fn read_rect_f32(&mut self) -> UnityResult<RectF32>
pub fn read_vector2(&mut self) -> UnityResult<Vector2>
pub fn read_vector3(&mut self) -> UnityResult<Vector3>
pub fn read_vector4(&mut self) -> UnityResult<Vector4>
pub fn read_matrix4x4(&mut self) -> UnityResult<Matrix4x4>
pub fn read_u16_list(&mut self, size: usize) -> UnityResult<Vec<u16>>
pub fn read_string_list(&mut self) -> UnityResult<Vec<String>>
pub fn read_f32_list(&mut self, size: usize) -> UnityResult<Vec<f32>>
pub fn read_matrix4x4_list( &mut self, size: usize, ) -> UnityResult<Vec<Matrix4x4>>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnwindSafe for Reader<'a>
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.