Preview of the proposed up-rust native-frame-model branch (up-rust b6b99c6d, up-spec f0e9b17) — not released documentation. branch · write-up

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. Role: standalone utility answering “what is my address?”; implemented per uEntity, consumed by the roles — see the trait map.

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. Role: standalone utility answering “what is my address?”; implemented per uEntity, consumed by the roles — see the trait map.

Source§

impl LocalUriProvider for StaticUriProvider