Crate libspecr

source ·
Expand description

libspecr is the standard library of specr lang.

Modules

The items from this module are automatically imported.

Macros

Wrapper around the std::format macro, returning libspecr::String instead of std::string::String.
Construct a List.

Structs

This type is basically a copy of the Align type in the Rust compiler. See Align.
Garbage collected big integer that implements Copy and supports construction in const contexts.
Uniformly samples a random non-negative Int
Garbage-collected Vec-like datastructure implementing Copy. Note that functions which seem to mutate the List, actually clone the list and allocate a new GcCow under the hood.
Garbage-collected hash map implementing Copy.
Wrapper-type for names of any kind.
Conceptually, this is a Nondet<Result<T, E>>.
Non-determinism primitive. See Non-determinism.
Garbage-collected hash set implementing Copy.
Size represents a non-negative number of bytes or bits.
Garbage-collected wrapper around std::string::String implementing Copy.

Traits

A probability distribution over values of type T.
Satisfied by types that can be constructed from some inner types.
Conversion to Int.

Functions

The pick function from the minirust spec. See Non-determinism.
The predict function from the minirust spec. See Non-determinism.
Wraps a value i as Some(i), Ok(i) or something similar of type T.