Skip to main content

Crate xur_runtime

Crate xur_runtime 

Source
Expand description

Running Xur programs.

Re-exports§

pub use marshal::Describe;
pub use marshal::Dyn;
pub use marshal::FromArg;
pub use marshal::FromValue;
pub use marshal::IntoXurValue;
pub use marshal::OneOf;
pub use marshal::OneOfVariants;
pub use marshal::Opt;
pub use marshal::OptionalArg;
pub use marshal::Raise;
pub use marshal::Res;
pub use marshal::TypeDesc;
pub use marshal::XurBytes;
pub use marshal::XurList;
pub use marshal::XurPtr;
pub use marshal::XurStr;
pub use marshal::desc;
pub use reflect::AdtInfo;
pub use reflect::FieldInfo;
pub use reflect::FnInfo;
pub use reflect::TypeRef;
pub use registry::Context;
pub use registry::Registry;

Modules§

convert
Converting between Rust values and Xur values, driven by facet shapes.
doc
A description of everything a Registry provides, for generated API docs: every module (lazy ones expanded), its functions with parameter names and types and return types, its types with their fields, variants, methods and Rust doc comments, and the methods of the built-in types.
marshal
Traits for converting between Rust types and Xur Values.
reflect
What native code can learn about Xur types at runtime, for std::reflect.
registry
Registering Rust functions and types as Xur modules.

Macros§

one_of
Defines an enum for use as a OneOf union argument.

Structs§

Adt
An instance of a struct, or of an enum variant, defined in Xur.
Closure
A closure value.
LangItems
The prelude’s Option and Result variants, which Rust’s Option and Result convert to and from.
MapKey
A value used as a map key: a str, int, bool, () or a unit enum variant. Build one with MapKey::new, which refuses anything else.
NativeObject
A value of a registered Rust type. Methods registered as taking &mut self change it in place, and every Xur value referring to it sees the change.
Range
Record
Named fields: a value of a Rust struct or enum converted to Xur, or a record read with a layout.
RuntimeError
An error raised while running a program, such as a type mismatch that could only be detected at runtime.
ValueIter
A shared iterator over values.

Enums§

BuiltinType
The kinds of built-in value that have methods, like list.push(x).
FloatValue
A float value that preserves its original width.
IntValue
An integer value that preserves its original width.
Value

Functions§

lock
Locks mutex. A panic while it was held doesn’t stop the program from using the value, as Xur values have no invariants a panic could break.
with_pair
Locks two shared values for reading without cloning. When they are the same value (aliased Arc — e.g. xs.zip(xs)), locks it once and hands the single guard to both sides; otherwise locks each. This avoids the deadlock a plain double lock of the same non-reentrant Mutex would hit.

Type Aliases§

RunResult