pub struct ContentTypeInfo {
pub best_guess: Option<String>,
pub from_bytes: Option<String>,
pub from_file_name: Option<String>,
pub from_header: Option<String>,
pub from_url_path: Option<String>,
}
Expand description
Detailed Content-Type information from Scotty. The Content-Type of the media will typically be filled in by the header or Scotty’s best_guess, but this extended information provides the backend with more information so that it can make a better decision if needed. This is only used on media upload requests from Scotty.
This type is not used in any activity, and only used as part of another schema.
Fields§
§best_guess: Option<String>
Scotty’s best guess of what the content type of the file is.
from_bytes: Option<String>
The content type of the file derived by looking at specific bytes (i.e. “magic bytes”) of the actual file.
from_file_name: Option<String>
The content type of the file derived from the file extension of the original file name used by the client.
from_header: Option<String>
The content type of the file as specified in the request headers, multipart headers, or RUPIO start request.
from_url_path: Option<String>
The content type of the file derived from the file extension of the URL path. The URL path is assumed to represent a file name (which is typically only true for agents that are providing a REST API).
Trait Implementations§
Source§impl Clone for ContentTypeInfo
impl Clone for ContentTypeInfo
Source§fn clone(&self) -> ContentTypeInfo
fn clone(&self) -> ContentTypeInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ContentTypeInfo
impl Debug for ContentTypeInfo
Source§impl Default for ContentTypeInfo
impl Default for ContentTypeInfo
Source§fn default() -> ContentTypeInfo
fn default() -> ContentTypeInfo
Source§impl<'de> Deserialize<'de> for ContentTypeInfo
impl<'de> Deserialize<'de> for ContentTypeInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ContentTypeInfo
impl Serialize for ContentTypeInfo
impl Part for ContentTypeInfo
Auto Trait Implementations§
impl Freeze for ContentTypeInfo
impl RefUnwindSafe for ContentTypeInfo
impl Send for ContentTypeInfo
impl Sync for ContentTypeInfo
impl Unpin for ContentTypeInfo
impl UnwindSafe for ContentTypeInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more