pub struct Separator { /* private fields */ }Expand description
Separate a sequence of [Op<[u8]>] into BasicBlock.
Implementations§
Source§impl Separator
impl Separator
Sourcepub fn push_all<I>(&mut self, iter: I) -> bool
pub fn push_all<I>(&mut self, iter: I) -> bool
Read instructions from iter until it is empty.
Returns true if any BasicBlock are ready.
Sourcepub fn push(&mut self, off: Offset<Op<[u8]>>) -> bool
pub fn push(&mut self, off: Offset<Op<[u8]>>) -> bool
Push a single instruction, returns true if a BasicBlock has been
completed.
Sourcepub fn take(&mut self) -> Vec<BasicBlock>
pub fn take(&mut self) -> Vec<BasicBlock>
Remove all completed BasicBlock.
Sourcepub fn finish(&mut self) -> Option<BasicBlock>
pub fn finish(&mut self) -> Option<BasicBlock>
Retrieve the last BasicBlock after all instructions have been
consumed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Separator
impl RefUnwindSafe for Separator
impl Send for Separator
impl Sync for Separator
impl Unpin for Separator
impl UnwindSafe for Separator
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