Trait LocalUriProvider

Source
pub trait LocalUriProvider: Send + Sync {
    // Required methods
    fn get_authority(&self) -> String;
    fn get_resource_uri(&self, resource_id: u16) -> UUri;
    fn get_source_uri(&self) -> UUri;
}
Expand description

A factory for URIs representing this uEntity’s resources.

Implementations may use arbitrary mechanisms to determine the information that is necessary for creating URIs, e.g. environment variables, configuration files etc.

Required Methods§

Source

fn get_authority(&self) -> String

Gets the authority used for URIs representing this uEntity’s resources.

Source

fn get_resource_uri(&self, resource_id: u16) -> UUri

Gets a URI that represents a given resource of this uEntity.

Source

fn get_source_uri(&self) -> UUri

Gets the URI that represents the resource that this uEntity expects RPC responses and notifications to be sent to.

Implementors§

Source§

impl LocalUriProvider for MockLocalUriProvider

A factory for URIs representing this uEntity’s resources.

Implementations may use arbitrary mechanisms to determine the information that is necessary for creating URIs, e.g. environment variables, configuration files etc.

Source§

impl LocalUriProvider for StaticUriProvider