Skip to main content

SpaceStore

Trait SpaceStore 

Source
pub trait SpaceStore {
    // Required method
    fn spaces(&self) -> &Registry<SpaceId, Space>;
}
Expand description

Anything that can resolve a SpaceId back to its Space.

Implemented by a consumer’s own context types so that Space::from_id works against them directly.

Required Methods§

Source

fn spaces(&self) -> &Registry<SpaceId, Space>

The space table this store holds.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SpaceStore for Context<'_>

Lets Space::from_id resolve against a &Context directly.

Source§

impl SpaceStore for Shared<'_>

Lets Space::from_id resolve against a bare &Shared, matching the pre-existing AsShared call shape.