pub struct Environment {
pub id: Ident,
pub language: Ident,
pub doc: Option<String>,
pub reach: Reach,
pub meta: Metadata,
}Expand description
A place implementations run.
Fields§
§id: IdentWhat this environment is called, referred to by implementations.
language: IdentThe language whose code runs here.
doc: Option<String>Prose describing it.
reach: ReachHow this process gets to it.
meta: MetadataNon-identifying annotations.
Implementations§
Source§impl Environment
impl Environment
Sourcepub fn here() -> Self
pub fn here() -> Self
The environment that is this process.
Every registry has one: it is where compiled-in Rust functions live, and where the interpreter walks bodies.
Sourcepub fn subprocess(
id: &str,
language: &str,
command: &str,
args: &[&str],
) -> Self
pub fn subprocess( id: &str, language: &str, command: &str, args: &[&str], ) -> Self
An environment reached by starting a program.
Sourcepub fn wasm(id: &str, language: &str, module: impl Into<PathBuf>) -> Self
pub fn wasm(id: &str, language: &str, module: impl Into<PathBuf>) -> Self
An environment reached by loading a WebAssembly module.
The language is what the guest was written in, which is worth keeping even though the host cannot tell: a route printed for a person should say a proof came from Rust or from Go, not that it came from bytecode.
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§impl Debug for Environment
impl Debug for Environment
Source§impl<'de> Deserialize<'de> for Environment
impl<'de> Deserialize<'de> for Environment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Environment
impl PartialEq for Environment
Source§impl Serialize for Environment
impl Serialize for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Forget for Environment
impl Freeze for Environmentwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environmentwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
impl UnwindSafe for Environmentwhere
RawVecInner: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
NonNull<u8>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
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