Skip to main content

ReadPublicResource

Trait ReadPublicResource 

Source
pub trait ReadPublicResource: ClientContext {
    type ResourceId;
    type Resource;

    // Required method
    fn get_public_resource(
        &self,
        id: &Self::ResourceId,
    ) -> impl Future<Output = Result<Self::Resource, Self::Error>>;
}
Expand description

Capability for reading one public resource by its primary service identifier.

Required Associated Types§

Source

type ResourceId

Service-specific resource identifier type.

Source

type Resource

Returned public resource payload.

Required Methods§

Source

fn get_public_resource( &self, id: &Self::ResourceId, ) -> impl Future<Output = Result<Self::Resource, Self::Error>>

Fetches one public resource.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§