Trait Load

Source
pub trait Load {
    type Output;

    // Required method
    fn load(
        &self,
        world: Tracked<'_, dyn World + '_>,
    ) -> SourceResult<Self::Output>;
}
Expand description

Loads data from a path or provided bytes.

Required Associated Types§

Source

type Output

Bytes or a list of bytes (if there are multiple sources).

Required Methods§

Source

fn load(&self, world: Tracked<'_, dyn World + '_>) -> SourceResult<Self::Output>

Load the bytes.

Implementations on Foreign Types§

Source§

impl Load for Spanned<&DataSource>

Source§

type Output = Bytes

Source§

fn load(&self, world: Tracked<'_, dyn World + '_>) -> SourceResult<Bytes>

Source§

impl Load for Spanned<&OneOrMultiple<DataSource>>

Source§

type Output = Vec<Bytes>

Source§

fn load(&self, world: Tracked<'_, dyn World + '_>) -> SourceResult<Vec<Bytes>>

Source§

impl Load for Spanned<DataSource>

Source§

type Output = Bytes

Source§

fn load(&self, world: Tracked<'_, dyn World + '_>) -> SourceResult<Bytes>

Source§

impl Load for Spanned<OneOrMultiple<DataSource>>

Source§

type Output = Vec<Bytes>

Source§

fn load(&self, world: Tracked<'_, dyn World + '_>) -> SourceResult<Vec<Bytes>>

Implementors§