pub struct MapLoader<'cache> { /* private fields */ }Expand description
Loads maps definitions lazily from the current cache.
Implementations§
Source§impl<'cache> MapLoader<'cache>
impl<'cache> MapLoader<'cache>
Sourcepub fn new(cache: &'cache Cache) -> Self
pub fn new(cache: &'cache Cache) -> Self
Make a new MapLoader.
This takes a Cache by references with a 'cache lifetime.
All the map definitions are loaded lazily where the &'cache Cache is used
to cache them internally on load.
pub fn load(&mut self, id: u16) -> Result<&MapDefinition, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'cache> Freeze for MapLoader<'cache>
impl<'cache> RefUnwindSafe for MapLoader<'cache>
impl<'cache> Send for MapLoader<'cache>
impl<'cache> Sync for MapLoader<'cache>
impl<'cache> Unpin for MapLoader<'cache>
impl<'cache> UnwindSafe for MapLoader<'cache>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more