Skip to main content

SpaceConfig

Struct SpaceConfig 

Source
#[non_exhaustive]
pub struct SpaceConfig { /* private fields */ }
Expand description

What a host decides when it mounts scripts: where they live and the ceiling it allows each one. Built with SpaceConfig::new and handed to space.

Who a request comes from is not configured here: it is the principal the request’s capability names (urn:cap:principal:<iri>), which the host’s door mints with Capability::with_principal (see authority::principal_of).

There is no default backend and no default ceiling, on purpose: both are the host’s decision, and a library that guessed either would be guessing about authority.

Implementations§

Source§

impl SpaceConfig

Source

pub fn new(backend: Arc<dyn Backend>, ceiling: CeilingPolicy) -> SpaceConfig

Scripts kept in backend, each run under the ceiling ceiling answers for it.

Source

pub fn sparql(self, door: SparqlDoor) -> SpaceConfig

Accept SPARQL scripts, evaluated through door (the store’s graph-scoped doors). Without it, publishing language=sparql is refused: which store a query runs against is the host’s decision, as the evaluator a Lisp script reaches is.

Source

pub fn on_change(self, hook: ChangeHook) -> SpaceConfig

Run hook with the script’s name after every publish or retire through this crate.

★ Wire it to kernel.cut(ikigai_core::BINDINGS_THREAD). A published SPARQL script is its own entry in the catalog and the action manifold (…:result and …:runs with ITS parameters as arguments), and the kernel caches every description and Meta answer under urn:kernel:bindings, which it cannot know a publish changed. The library holds no kernel and an endpoint may not cut that thread without urn:cap:kernel:cut, so the host, which holds both, makes the cut. Unwired, a new query is runnable at once but the catalog, MCP and the engine’s argument routing describe the old set until something else cuts the thread.

Trait Implementations§

Source§

impl Clone for SpaceConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V