pub struct SignedURLOptions {
    pub method: SignedURLMethod,
    pub expires: Duration,
    pub content_type: Option<String>,
    pub headers: Vec<String>,
    pub query_parameters: HashMap<String, Vec<String>>,
    pub md5: Option<String>,
    pub style: Box<dyn URLStyle + Send + Sync>,
    pub insecure: bool,
}
Expand description

SignedURLOptions allows you to restrict the access to the signed URL.

Fields§

§method: SignedURLMethod

Method is the HTTP method to be used with the signed URL. Signed URLs can be used with GET, HEAD, PUT, and DELETE requests. Required.

§expires: Duration

Expires is the expiration time on the signed URL. It must be a datetime in the future. For SigningSchemeV4, the expiration may be no more than seven days in the future. Required.

§content_type: Option<String>

ContentType is the content type header the client must provide to use the generated signed URL. Optional.

§headers: Vec<String>

Headers is a list of extension headers the client must provide in order to use the generated signed URL. Each must be a string of the form “key:values”, with multiple values separated by a semicolon. Optional.

§query_parameters: HashMap<String, Vec<String>>

QueryParameters is a map of additional query parameters. When SigningScheme is V4, this is used in computing the signature, and the client must use the same query parameters when using the generated signed URL. Optional.

§md5: Option<String>

MD5 is the base64 encoded MD5 checksum of the file. If provided, the client should provide the exact value on the request header in order to use the signed URL. Optional.

§style: Box<dyn URLStyle + Send + Sync>

Style provides options for the type of URL to use. Options are PathStyle (default), BucketBoundHostname, and VirtualHostedStyle. See https://cloud.google.com/storage/docs/request-endpoints for details. Only supported for V4 signing. Optional.

§insecure: bool

Insecure determines whether the signed URL should use HTTPS (default) or HTTP. Only supported for V4 signing. Optional.

Trait Implementations§

source§

impl Default for SignedURLOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more