Trait Link

Source
pub trait Link:
    Sized
    + Send
    + Sync
    + 'static {
    type Error;
    type CreateData<'a>: SystemData<'a>;
    type PersistData<'a>: SystemData<'a>;
    type DeleteData<'a>: SystemData<'a>;

    // Required methods
    fn create(
        this: &LinkHandle<Self>,
        data: &mut Self::CreateData<'_>,
    ) -> Result<(), Self::Error>;
    fn persist(
        this: &LinkHandle<Self>,
        data: &mut Self::PersistData<'_>,
    ) -> bool;
    fn delete(this: &LinkHandle<Self>, data: &mut Self::DeleteData<'_>);
}

Required Associated Types§

Source

type Error

Source

type CreateData<'a>: SystemData<'a>

Source

type PersistData<'a>: SystemData<'a>

Source

type DeleteData<'a>: SystemData<'a>

Required Methods§

Source

fn create( this: &LinkHandle<Self>, data: &mut Self::CreateData<'_>, ) -> Result<(), Self::Error>

Source

fn persist(this: &LinkHandle<Self>, data: &mut Self::PersistData<'_>) -> bool

Source

fn delete(this: &LinkHandle<Self>, data: &mut Self::DeleteData<'_>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

type CreateData<'a> = (Read<'a, IdMaps>, Storage<'a, Is<Interactor>, FetchMut<'a, MaskedStorage<Is<Interactor>>>>, Storage<'a, Interactors, FetchMut<'a, MaskedStorage<Interactors>>>, Storage<'a, CharacterState, FetchMut<'a, MaskedStorage<CharacterState>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Alignment, Fetch<'a, MaskedStorage<Alignment>>>)

Source§

type DeleteData<'a> = (Read<'a, IdMaps>, Storage<'a, Is<Interactor>, FetchMut<'a, MaskedStorage<Is<Interactor>>>>, Storage<'a, Interactors, FetchMut<'a, MaskedStorage<Interactors>>>, Storage<'a, CharacterState, FetchMut<'a, MaskedStorage<CharacterState>>>)

Source§

type Error = InteractionError

Source§

type PersistData<'a> = (Read<'a, IdMaps>, Read<'a, EntitiesRes>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, Is<Interactor>, Fetch<'a, MaskedStorage<Is<Interactor>>>>, Storage<'a, Interactors, Fetch<'a, MaskedStorage<Interactors>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Alignment, Fetch<'a, MaskedStorage<Alignment>>>)

Source§

type CreateData<'a> = (Read<'a, IdMaps>, Read<'a, EntitiesRes>, Storage<'a, Is<Mount>, FetchMut<'a, MaskedStorage<Is<Mount>>>>, Storage<'a, Is<Rider>, FetchMut<'a, MaskedStorage<Is<Rider>>>>, Storage<'a, Is<VolumeRider>, Fetch<'a, MaskedStorage<Is<VolumeRider>>>>, Storage<'a, Is<Follower>, Fetch<'a, MaskedStorage<Is<Follower>>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>)

Source§

type DeleteData<'a> = (Read<'a, IdMaps>, Storage<'a, Is<Mount>, FetchMut<'a, MaskedStorage<Is<Mount>>>>, Storage<'a, Is<Rider>, FetchMut<'a, MaskedStorage<Is<Rider>>>>, Storage<'a, Pos, FetchMut<'a, MaskedStorage<Pos>>>, Storage<'a, ForceUpdate, FetchMut<'a, MaskedStorage<ForceUpdate>>>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>)

Source§

type Error = MountingError

Source§

type PersistData<'a> = (Read<'a, IdMaps>, Read<'a, EntitiesRes>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, Body, Fetch<'a, MaskedStorage<Body>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Is<Mount>, Fetch<'a, MaskedStorage<Is<Mount>>>>, Storage<'a, Is<Rider>, Fetch<'a, MaskedStorage<Is<Rider>>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>)

Source§

type CreateData<'a> = (Read<'a, EntitiesRes>, Write<'a, VolumeRiders>, Storage<'a, VolumeRiders, FetchMut<'a, MaskedStorage<VolumeRiders>>>, Storage<'a, Is<VolumeRider>, FetchMut<'a, MaskedStorage<Is<VolumeRider>>>>, Storage<'a, Is<Rider>, Fetch<'a, MaskedStorage<Is<Rider>>>>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, IdMaps>, Storage<'a, Collider, Fetch<'a, MaskedStorage<Collider>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>)

Source§

type DeleteData<'a> = (Write<'a, VolumeRiders>, Storage<'a, VolumeRiders, FetchMut<'a, MaskedStorage<VolumeRiders>>>, Storage<'a, Is<VolumeRider>, FetchMut<'a, MaskedStorage<Is<VolumeRider>>>>, Read<'a, IdMaps>)

Source§

type Error = MountingError

Source§

type PersistData<'a> = (Read<'a, EntitiesRes>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Read<'a, VolumeRiders>, Storage<'a, VolumeRiders, Fetch<'a, MaskedStorage<VolumeRiders>>>, Storage<'a, Is<VolumeRider>, Fetch<'a, MaskedStorage<Is<VolumeRider>>>>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, IdMaps>, Storage<'a, Collider, Fetch<'a, MaskedStorage<Collider>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>)

Source§

type CreateData<'a> = (Read<'a, IdMaps>, Storage<'a, Is<Leader>, FetchMut<'a, MaskedStorage<Is<Leader>>>>, Storage<'a, Is<Follower>, FetchMut<'a, MaskedStorage<Is<Follower>>>>, Storage<'a, Is<Rider>, Fetch<'a, MaskedStorage<Is<Rider>>>>, Storage<'a, Is<VolumeRider>, Fetch<'a, MaskedStorage<Is<VolumeRider>>>>)

Source§

type DeleteData<'a> = (Read<'a, IdMaps>, Storage<'a, Is<Leader>, FetchMut<'a, MaskedStorage<Is<Leader>>>>, Storage<'a, Is<Follower>, FetchMut<'a, MaskedStorage<Is<Follower>>>>)

Source§

type Error = TetherError

Source§

type PersistData<'a> = (Read<'a, IdMaps>, Read<'a, EntitiesRes>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, Is<Leader>, Fetch<'a, MaskedStorage<Is<Leader>>>>, Storage<'a, Is<Follower>, Fetch<'a, MaskedStorage<Is<Follower>>>>)