pub struct ResourceManager { /* private fields */ }Expand description
Resource manager handles URI matching and dispatch
Implementations§
Source§impl ResourceManager
impl ResourceManager
pub fn new() -> Self
Sourcepub fn register(
&mut self,
def: ResourceDef,
handler: Arc<dyn ResourceHandler>,
) -> Result<()>
pub fn register( &mut self, def: ResourceDef, handler: Arc<dyn ResourceHandler>, ) -> Result<()>
Register a resource with URI template matching
Sourcepub fn list_templates(&self) -> Vec<&str>
pub fn list_templates(&self) -> Vec<&str>
List all registered resource templates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResourceManager
impl !RefUnwindSafe for ResourceManager
impl Send for ResourceManager
impl Sync for ResourceManager
impl Unpin for ResourceManager
impl !UnwindSafe for ResourceManager
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