pub struct InstructionStream<'a> { /* private fields */ }Expand description
Represents a single SPIR-V instruction stream.
Implementations§
Source§impl<'a> InstructionStream<'a>
impl<'a> InstructionStream<'a>
Sourcepub fn advance(&mut self, count: u32) -> ParseResult<()>
pub fn advance(&mut self, count: u32) -> ParseResult<()>
Advances the streams position without reading.
Sourcepub fn read(&mut self) -> ParseResult<u32>
pub fn read(&mut self) -> ParseResult<u32>
Reads a word from the stream.
Sourcepub fn read_words(&mut self, count: Option<u32>) -> ParseResult<&'a [u32]>
pub fn read_words(&mut self, count: Option<u32>) -> ParseResult<&'a [u32]>
Reads multiple words from the stream.
Pass None for count to read until the end of the stream.
Sourcepub fn read_string(&mut self) -> ParseResult<CompilerStr<'a>>
pub fn read_string(&mut self) -> ParseResult<CompilerStr<'a>>
Reads a string.
Trait Implementations§
Source§impl<'a> Clone for InstructionStream<'a>
impl<'a> Clone for InstructionStream<'a>
Source§fn clone(&self) -> InstructionStream<'a>
fn clone(&self) -> InstructionStream<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for InstructionStream<'a>
Auto Trait Implementations§
impl<'a> Freeze for InstructionStream<'a>
impl<'a> RefUnwindSafe for InstructionStream<'a>
impl<'a> Send for InstructionStream<'a>
impl<'a> Sync for InstructionStream<'a>
impl<'a> Unpin for InstructionStream<'a>
impl<'a> UnsafeUnpin for InstructionStream<'a>
impl<'a> UnwindSafe for InstructionStream<'a>
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