pub struct BlockView<'a> {
pub ctx: &'a Context<'static>,
pub block: BlockId,
}Expand description
A read-only look at a block, for choosing sites.
Fields§
§ctx: &'a Context<'static>§block: BlockIdImplementations§
Source§impl BlockView<'_>
impl BlockView<'_>
Sourcepub fn entry(&self) -> Option<Site>
pub fn entry(&self) -> Option<Site>
The site at the block’s entry, if the block starts at a guest address.
Anchored on the first instruction that is not an interrupt an earlier hook placed at the entry, so hooks on the same entry fire in registration order and a hook recognises its own anchor when asked again.
Sourcepub fn addresses(&self) -> Vec<Site>
pub fn addresses(&self) -> Vec<Site>
Every guest instruction that starts in the block, in order, as a site on the first instruction lifted from it.
One guest instruction’s p-code may branch within itself, so a block with no address of its own can open with the tail of an instruction begun in its predecessor. Those instructions carry the predecessor’s last address; they are a continuation, not a start, and get no site.
Auto Trait Implementations§
impl<'a> Freeze for BlockView<'a>
impl<'a> RefUnwindSafe for BlockView<'a>
impl<'a> Send for BlockView<'a>
impl<'a> Sync for BlockView<'a>
impl<'a> Unpin for BlockView<'a>
impl<'a> UnsafeUnpin for BlockView<'a>
impl<'a> UnwindSafe for BlockView<'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