Struct MemoryStream8

Source
pub struct MemoryStream8 { /* private fields */ }
Expand description

Memory-based stream (u8-based)

Implementations§

Source§

impl MemoryStream8

Source

pub fn new(rock: u32, buffer: RetainedBuffer<u8>, mode: filemode) -> Self

Trait Implementations§

Source§

impl Stream for MemoryStream8

Source§

fn close(&mut self) -> Option<stream_result_t>

This function is called before closing the stream. It returns the current stream counters, or None if the stream may not be closed. Read more
Source§

fn get_rock(&self) -> u32

Gets the rock for the stream. This is an arbitrary u32 that was provided on creation. Read more
Source§

fn set_position(&mut self, pos: i32, mode: seekmode)

Set current position for reading/writing in the stream. Read more
Source§

fn get_position(&mut self) -> u32

Get current position for reading/writing in the stream. Read more
Source§

fn put_buffer(&mut self, buf: &[u8]) -> strid_t

Write to the stream. Optionally returns a stream id to mirror to. Read more
Source§

fn put_buffer_uni(&mut self, buf: &[u32]) -> strid_t

Write unicode code points to the stream. Optionally returns a stream id to mirror to. Read more
Source§

fn set_style(&mut self, _styl: Style) -> strid_t

Set current style. Streams that don’t have a concept of style can simply ignore this. Optionally returns a stream id to mirror to. Read more
Source§

fn get_buffer(&mut self, buf: &mut [u8]) -> u32

Read from the stream. Read more
Source§

fn get_buffer_uni(&mut self, buf: &mut [u32]) -> u32

Read unicode code points from the stream. Read more
Source§

fn set_di_rock(&mut self, girock: rock)

Set dispatch rock. This is an arbitrary value stored by the Glk client in the stream object. Read more
Source§

fn get_di_rock(&self) -> rock

Get dispatch rock. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.