Skip to main content

CloudFrontHandler

Trait CloudFrontHandler 

Source
pub trait CloudFrontHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn provider_arc(&self) -> Arc<RustackCloudFront>;
}
Expand description

Handler trait — exists for symmetry with other services. The built-in implementation dispatches directly to RustackCloudFront.

Required Methods§

Source

fn provider_arc(&self) -> Arc<RustackCloudFront>

Get the underlying provider as an owned Arc.

create_distribution, copy_distribution, update_distribution, and create_invalidation take self: &Arc<Self> so they can spawn propagation tasks that outlive the caller. The service layer stores an Arc<H>; this method converts that into the owning Arc<RustackCloudFront> needed by the provider.

Implementations on Foreign Types§

Source§

impl CloudFrontHandler for Arc<RustackCloudFront>

The canonical handler: an Arc<RustackCloudFront> wrapped in the service’s outer Arc. The double-Arc is required because the hyper service owns the handler by Arc<H> while the provider’s methods need Arc<RustackCloudFront>.

Implementors§