FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BigEndianBinaryReader

    struct · ferroui-base · v0.5.0

    struct BigEndianBinaryReader<'a>
    

    Binary reader using big-endian encoding over a byte slice.

    No method panics on malformed input: reading past the end gives FontTableError::EndOfSpan.

    View source

    Members

    new

    fn new(span: &'a [u8]) -> Self
    

    Initializes a new reader over span.

    Source

    position

    fn position(self: &Self) -> i32
    

    Gets the current position in the span.

    Source

    seek

    fn seek(self: &mut Self, offset: i32) -> Result<(), FontTableError>
    

    Seeks within the span.

    Source

    read_byte

    fn read_byte(self: &mut Self) -> Result<u8, FontTableError>
    

    Source

    read_sbyte

    fn read_sbyte(self: &mut Self) -> Result<i8, FontTableError>
    

    Source

    read_f2dot14

    fn read_f2dot14(self: &mut Self) -> Result<f32, FontTableError>
    

    Source

    read_int16

    fn read_int16(self: &mut Self) -> Result<i16, FontTableError>
    

    Source

    read_int16_as

    fn read_int16_as<T: From<u16>>(self: &mut Self) -> Result<T, FontTableError>
    

    Reads a 16 bit value and reinterprets it as T (the reference's ReadInt16<TEnum>).

    Source

    read_fword

    fn read_fword(self: &mut Self) -> Result<i16, FontTableError>
    

    Source

    read_fword_array

    fn read_fword_array(self: &mut Self, length: i32) -> Result<Vec<i16>, FontTableError>
    

    Source

    read_ufword

    fn read_ufword(self: &mut Self) -> Result<u16, FontTableError>
    

    Source

    read_fixed

    fn read_fixed(self: &mut Self) -> Result<f32, FontTableError>
    

    Source

    read_version16_dot16

    fn read_version16_dot16(self: &mut Self) -> Result<FontVersion, FontTableError>
    

    Source

    read_int32

    fn read_int32(self: &mut Self) -> Result<i32, FontTableError>
    

    Source

    read_int64

    fn read_int64(self: &mut Self) -> Result<i64, FontTableError>
    

    Source

    read_uint16

    fn read_uint16(self: &mut Self) -> Result<u16, FontTableError>
    

    Source

    read_offset16

    fn read_offset16(self: &mut Self) -> Result<u16, FontTableError>
    

    Source

    read_uint16_as

    fn read_uint16_as<T: From<u16>>(self: &mut Self) -> Result<T, FontTableError>
    

    Reads a 16 bit value and reinterprets it as T (the reference's ReadUInt16<TEnum>).

    Source

    read_uint16_array

    fn read_uint16_array(self: &mut Self, length: i32) -> Result<Vec<u16>, FontTableError>
    

    Source

    read_uint16_array_into

    fn read_uint16_array_into(self: &mut Self, buffer: &mut [u16]) -> Result<(), FontTableError>
    

    Source

    read_uint32_array

    fn read_uint32_array(self: &mut Self, length: i32) -> Result<Vec<u32>, FontTableError>
    

    Source

    read_uint8_array

    fn read_uint8_array(self: &mut Self, length: i32) -> Result<Vec<u8>, FontTableError>
    

    Source

    read_int16_array

    fn read_int16_array(self: &mut Self, length: i32) -> Result<Vec<i16>, FontTableError>
    

    Source

    read_int16_array_into

    fn read_int16_array_into(self: &mut Self, buffer: &mut [i16]) -> Result<(), FontTableError>
    

    Source

    read_uint8

    fn read_uint8(self: &mut Self) -> Result<u8, FontTableError>
    

    Source

    read_uint24

    fn read_uint24(self: &mut Self) -> Result<i32, FontTableError>
    

    Source

    read_uint32

    fn read_uint32(self: &mut Self) -> Result<u32, FontTableError>
    

    Source

    read_offset32

    fn read_offset32(self: &mut Self) -> Result<u32, FontTableError>
    

    Source

    read_bytes

    fn read_bytes(self: &mut Self, count: i32) -> Vec<u8>
    

    Reads up to count bytes, truncating at the end of the span; the returned vector is shorter than count when fewer bytes remain.

    Source

    read_string

    fn read_string(self: &mut Self, bytes_to_read: i32, encoding: Encoding) -> Result<String, FontTableError>
    

    Source

    read_tag

    fn read_tag(self: &mut Self) -> Result<String, FontTableError>
    

    Source

    read_offset

    fn read_offset(self: &mut Self, size: i32) -> Result<i32, FontTableError>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.