pub trait DiscoveryHandler {
Show 20 methods
// Required methods
fn handle_list_services<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_get_endpoints<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_get_schema<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_ping<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_get_auth_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_prepare_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_get_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_list_streams<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_announce<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ServiceAnnouncement,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_register_entity_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 RegisterEntityStatementRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_get_entity_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_register_envelope_keyset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 RegisterEnvelopeKeysetRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_get_envelope_keyset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_list_known_issuers<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_get_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 GetRecordRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_get_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_query_candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 QueryCandidatesRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_report_node_liveness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 NodeLiveness,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Expand description
Generated handler trait for the Discovery service.
Required Methods§
Sourcefn handle_list_services<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_list_services<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle listServices request.
Sourcefn handle_get_endpoints<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_endpoints<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getEndpoints request.
Sourcefn handle_get_schema<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_schema<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getSchema request.
Sourcefn handle_ping<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_ping<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle ping request.
Sourcefn handle_get_auth_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_auth_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getAuthMetadata request.
Sourcefn handle_prepare_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_prepare_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle prepareStream request.
Sourcefn handle_get_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_get_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle getStream request.
Sourcefn handle_list_streams<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_list_streams<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle listStreams request.
Sourcefn handle_announce<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ServiceAnnouncement,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_announce<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ServiceAnnouncement,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle announce request.
Sourcefn handle_register_entity_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 RegisterEntityStatementRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_register_entity_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 RegisterEntityStatementRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle registerEntityStatement request.
Sourcefn handle_get_entity_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_entity_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getEntityStatement request.
Sourcefn handle_register_envelope_keyset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 RegisterEnvelopeKeysetRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_register_envelope_keyset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 RegisterEnvelopeKeysetRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle registerEnvelopeKeyset request.
Sourcefn handle_get_envelope_keyset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_envelope_keyset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getEnvelopeKeyset request.
Sourcefn handle_list_known_issuers<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_list_known_issuers<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle listKnownIssuers request.
Sourcefn handle_get_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 GetRecordRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 GetRecordRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getRecord request.
Sourcefn handle_get_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle getRepo request.
Sourcefn handle_query_candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 QueryCandidatesRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_query_candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 QueryCandidatesRequest,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle queryCandidates request.
Sourcefn handle_report_node_liveness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 NodeLiveness,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_report_node_liveness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 NodeLiveness,
) -> Pin<Box<dyn Future<Output = Result<DiscoveryResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle reportNodeLiveness request.
Provided Methods§
Authorize an operation on a resource. Override to enforce policy.
Called by generated dispatch functions before handler methods. Every
method carries a mandatory $scope/$capability annotation (S3, #547)
except explicit $scopeExempt methods, which are not gated here.
Default: deny all. Services MUST override to enable access.
Check if a specific resource+operation is authorized (non-failing).
Useful for filtering list results per-resource.
Default delegates to authorize().is_ok().