pub struct HostOp {
pub module: Arc<str>,
pub operation: Arc<str>,
pub resource: Option<Arc<str>>,
pub result: LayoutId,
}Expand description
One host operation a program calls: console.log, files.read,
files.Writer.writeLine.
Fields§
§module: Arc<str>§operation: Arc<str>§resource: Option<Arc<str>>The resource kind the operation belongs to, for one addressed to a
handle rather than to the module: Writer in
files.Writer.writeLine.
It is what Inst::CallResource names and what
Inst::CallHost does not, so one table holds both and the two
namings cannot collide: a module’s files.write and a resource’s
files.Writer.write are two entries rather than one.
Nothing dispatches on it. Which resource an operation reaches is the business of the handle the receiver names — ADR 0013 gives the host the only record of what is open — and this is what the call site settled, kept for the disassembly and for a diagnostic that has to say what was being called.
result: LayoutIdThe layout of the value location the host’s answer is written into.
A schema that declared its result Any gives a boxed layout;
anything else gives the layout of the declared type.
Implementations§
Trait Implementations§
impl Eq for HostOp
impl StructuralPartialEq for HostOp
Auto Trait Implementations§
impl Freeze for HostOp
impl RefUnwindSafe for HostOp
impl Send for HostOp
impl Sync for HostOp
impl Unpin for HostOp
impl UnsafeUnpin for HostOp
impl UnwindSafe for HostOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.