pub struct RouterOptions<A> {
pub upload_config: UploadConfig,
pub authz: ArcAuthzPolicy<A>,
pub serving_prefix: String,
}Expand description
Options for BucketModule::router.
authz is the only required field — the policy decides whether an
authenticated caller may read a given file. Defaults: stock
UploadConfig (256 MiB single-shot / 16 MiB per chunk) and
/cdn as the serving prefix.
Fields§
§upload_config: UploadConfig§authz: ArcAuthzPolicy<A>§serving_prefix: StringImplementations§
Source§impl<A> RouterOptions<A>
impl<A> RouterOptions<A>
Sourcepub fn new(authz: ArcAuthzPolicy<A>) -> Self
pub fn new(authz: ArcAuthzPolicy<A>) -> Self
Construct with the policy and module-default values.
Sourcepub fn with_upload_config(self, cfg: UploadConfig) -> Self
pub fn with_upload_config(self, cfg: UploadConfig) -> Self
Override the single-shot / chunk body limits.
Sourcepub fn with_serving_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_serving_prefix(self, prefix: impl Into<String>) -> Self
Override the serving-router mount path (default /cdn).
Auto Trait Implementations§
impl<A> !RefUnwindSafe for RouterOptions<A>
impl<A> !UnwindSafe for RouterOptions<A>
impl<A> Freeze for RouterOptions<A>
impl<A> Send for RouterOptions<A>
impl<A> Sync for RouterOptions<A>
impl<A> Unpin for RouterOptions<A>
impl<A> UnsafeUnpin for RouterOptions<A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.