Crate libspecr

Source
Expand description

libspecr is the standard library of specr lang.

Modules§

prelude
The items from this module are automatically imported.

Macros§

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

Structs§

Align
This type is basically a copy of the Align type in the Rust compiler. See Align.
DynWrite
Garbage-collected data structure representing a write stream and implementing Copy.
Int
Garbage collected big integer that implements Copy and supports construction in const contexts.
IntDistribution
Uniformly samples a random non-negative Int
List
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.
Map
Garbage-collected hash map implementing Copy.
Name
Wrapper-type for names of any kind.
NdResult
Conceptually, this is a Nondet<Result<T, E>>.
Nondet
Non-determinism primitive. See Non-determinism.
Set
Garbage-collected hash set implementing Copy.
Size
Size represents a non-negative number of bytes or bits.
String
Garbage-collected wrapper around std::string::String implementing Copy.

Traits§

Distribution
A probability distribution over values of type T.
GcWrite
An object that fulfills both GcCompat and Write.
MonadicReturn
Satisfied by types that can be constructed from some inner types.
ToInt
Conversion to Int.

Functions§

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

Derive Macros§

GcCompat