Skip to main content

StandardLibrary

Struct StandardLibrary 

Source
pub struct StandardLibrary;
Expand description

Standard library definitions.

Implementations§

Source§

impl StandardLibrary

Source

pub fn register(ctx: &mut Context)

Register all standard library definitions in the context.

A thousand checked declarations and their checked equation lemmas: production code asks the process’s one registration, StandardLibrary::context, instead.

Source

pub fn context() -> &'static Context

The standard library’s context, registered once per process.

A registered Context is Arc-backed and copy-on-write throughout (every mutating accessor goes through Arc::make_mut), so a caller that only asks questions borrows this one, and a caller that extends it clones it: about a microsecond, sharing every table until the clone writes to it, against the ~0.3 s (optimized) of registering again. The clone is an independent value; the attestation caches it shares are keyed by the registry generation they inspected, so a clone that diverges never reads another’s answer. the_cached_prelude_is_indistinguishable_from_a_fresh_one pins it against a fresh registration.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.