Expand description
Running Xur programs.
Re-exports§
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 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
Registryprovides, 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§
Structs§
- Adt
- An instance of a struct, or of an enum variant, defined in Xur.
- Closure
- A closure value.
- Lang
Items - The prelude’s
OptionandResultvariants, which Rust’sOptionandResultconvert to and from. - MapKey
- A value used as a map key. Only hashable types (str, int, bool) are accepted; unhashable ones (list, map, etc.) will panic if used as keys.
- Native
Object - A value of a registered Rust type. Methods registered as taking
&mut selfchange 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.
- Runtime
Error - An error raised while running a program, such as a type mismatch that could only be detected at runtime.
- Value
Iter - A shared iterator over values.
Enums§
- Builtin
Type - The kinds of built-in value that have methods, like
list.push(x). - Float
Value - 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 doublelockof the same non-reentrantMutexwould hit.