pub unsafe trait Fetch<'a>: Sized {
type Output;
type WorldBorrows;
type DirectBorrows;
// Required methods
unsafe fn borrow_world(
&self,
world: &'a World,
) -> Option<Self::WorldBorrows>;
unsafe fn get_world(
&self,
borrows: &Self::WorldBorrows,
id: Id,
) -> Option<Self::Output>;
unsafe fn borrow_direct(
&self,
entity: &'a Entity,
) -> Option<Self::DirectBorrows>;
unsafe fn get(&self, borrows: &Self::DirectBorrows) -> Self::Output;
}
Required Associated Types§
Required Methods§
unsafe fn borrow_world(&self, world: &'a World) -> Option<Self::WorldBorrows>
unsafe fn get_world( &self, borrows: &Self::WorldBorrows, id: Id, ) -> Option<Self::Output>
unsafe fn borrow_direct( &self, entity: &'a Entity, ) -> Option<Self::DirectBorrows>
unsafe fn get(&self, borrows: &Self::DirectBorrows) -> Self::Output
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.