Skip to main content

Authorizer

Trait Authorizer 

Source
pub trait Authorizer:
    Sync
    + Send
    + 'static {
    type Error: Error + Debug + Send + Sync;

    // Required methods
    fn project_id(&self) -> &str;
    fn authorize<T: Send + Sync>(
        &self,
        request: &mut Request<T>,
        scopes: &[&str],
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
👎Deprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Required Associated Types§

Source

type Error: Error + Debug + Send + Sync

👎Deprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Required Methods§

Source

fn project_id(&self) -> &str

👎Deprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Source

fn authorize<T: Send + Sync>( &self, request: &mut Request<T>, scopes: &[&str], ) -> impl Future<Output = Result<(), Self::Error>> + Send

👎Deprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Authorizer for GcpAuthorizer

Available on crate feature gcp-authorizer only.