pub struct ResourceServiceHandle(/* private fields */);Expand description
Cloneable, type-erased resource service registered by an adapter.
Implementations§
Source§impl ResourceServiceHandle
impl ResourceServiceHandle
Sourcepub fn new(service: Arc<dyn ResourceService>) -> Self
pub fn new(service: Arc<dyn ResourceService>) -> Self
Wraps a trusted resource service.
Sourcepub fn resources(
&self,
request: &ResourceRequest,
) -> Result<Vec<Object>, ResourceError>
pub fn resources( &self, request: &ResourceRequest, ) -> Result<Vec<Object>, ResourceError>
Answers one request, refusing sources the service does not cover and answers that break the contract.
Trait Implementations§
Source§impl Clone for ResourceServiceHandle
impl Clone for ResourceServiceHandle
Source§impl SnapshotBoundService for ResourceServiceHandle
impl SnapshotBoundService for ResourceServiceHandle
Source§fn source_snapshots(&self) -> &[SourceSnapshot]
fn source_snapshots(&self) -> &[SourceSnapshot]
Exact source snapshots used to construct this service.
Auto Trait Implementations§
impl !RefUnwindSafe for ResourceServiceHandle
impl !UnwindSafe for ResourceServiceHandle
impl Freeze for ResourceServiceHandle
impl Send for ResourceServiceHandle
impl Sync for ResourceServiceHandle
impl Unpin for ResourceServiceHandle
impl UnsafeUnpin for ResourceServiceHandle
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