pub struct BundleContext<B: ResourceBundleDecl> { /* private fields */ }Expand description
Context passed to bundle providers when building resources.
Implementations§
Source§impl<B: ResourceBundleDecl> BundleContext<B>
impl<B: ResourceBundleDecl> BundleContext<B>
pub const fn new(bundle_index: BundleIndex, bundle_id: &'static str) -> Self
pub const fn bundle_id(&self) -> &'static str
pub const fn bundle_index(&self) -> BundleIndex
pub fn key<T>(&self, id: B::Id) -> ResourceKey<T>
Auto Trait Implementations§
impl<B> Freeze for BundleContext<B>
impl<B> RefUnwindSafe for BundleContext<B>where
B: RefUnwindSafe,
impl<B> Send for BundleContext<B>where
B: Send,
impl<B> Sync for BundleContext<B>where
B: Sync,
impl<B> Unpin for BundleContext<B>where
B: Unpin,
impl<B> UnwindSafe for BundleContext<B>where
B: UnwindSafe,
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