Expand description
Sealed scope-set type family for crate::PcsExternalClient<S>.
The four scope sets map to the OAuth2 scopes your app requested when
calling PasTokenUrl with the client_credentials grant. Methods on
crate::PcsExternalClient are gated by capability marker traits
(SendAlertCapable, GetSendStatusCapable) so calling a method your
app isn’t authorised for is a compile-time error (E0277), not a
runtime rejection.
§Compile-time enforcement example
ⓘ
use pcs_external::{PcsExternalClient, scopes::ReadOnly};
fn try_send(client: &PcsExternalClient<ReadOnly>) {
// send_alert requires SendAlertCapable; ReadOnly doesn't satisfy it.
// This line must not compile.
let _ = client.send_alert(todo!(), todo!(), None);
}Structs§
- Full
Access - Full access: all methods.
- Read
AndSend - Read + send:
send_alert+get_send_status. - Read
Only - Read-only access:
get_send_statusonly. - Send
Only - Send-only access:
send_alertonly. Used by RCW notification adapter.
Traits§
- GetSend
Status Capable - Capability marker: scope set may call
get_send_status. - PcsExternal
Scope Set - Parent marker for all PCS External API scope sets.
- Send
Alert Capable - Capability marker: scope set may call
send_alert.