pub enum ResourceSource {
Section,
Prepare,
Initializer(Path),
}Expand description
WHERE one declared resource’s options come from — the emitter’s half of the single-source law.
It mirrors the framework’s own vocabulary and adds the one thing an emission needs and a runtime does not: the PATH a named initializer was written as, which is a token and never a value.
Variants§
Section
#[ingraph(resource)] — the deployment’s [resources.<mount>] section.
Prepare
#[ingraph(resource(factory))] — the application’s own prepare closure.
Initializer(Path)
#[ingraph(resource(factory = "path::to::fn"))] — a function the create walk calls itself.
Implementations§
Trait Implementations§
Source§impl Clone for ResourceSource
impl Clone for ResourceSource
Source§impl Debug for ResourceSource
impl Debug for ResourceSource
impl Eq for ResourceSource
Source§impl PartialEq for ResourceSource
impl PartialEq for ResourceSource
impl StructuralPartialEq for ResourceSource
Auto Trait Implementations§
impl !Send for ResourceSource
impl !Sync for ResourceSource
impl Freeze for ResourceSource
impl RefUnwindSafe for ResourceSource
impl Unpin for ResourceSource
impl UnsafeUnpin for ResourceSource
impl UnwindSafe for ResourceSource
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