pub enum ResourceDef {
Static {
resource: Resource,
handler: ResourceHandlerFn,
},
Template {
template: ResourceTemplate,
handler: ResourceHandlerFn,
},
}Expand description
A fully-described resource produced by the #[resource] proc macro.
Variants§
Implementations§
Source§impl ResourceDef
impl ResourceDef
pub fn new_static(resource: Resource, handler: ResourceHandlerFn) -> Self
pub fn new_template( template: ResourceTemplate, handler: ResourceHandlerFn, ) -> Self
Auto Trait Implementations§
impl Freeze for ResourceDef
impl !RefUnwindSafe for ResourceDef
impl Send for ResourceDef
impl Sync for ResourceDef
impl Unpin for ResourceDef
impl UnsafeUnpin for ResourceDef
impl !UnwindSafe for ResourceDef
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