pub struct UploadFile {
pub data: MultipartData,
}Expand description
Serialized arguments for the [upload_file] server function.
Fields§
§data: MultipartDataTrait Implementations§
Source§impl Debug for UploadFile
impl Debug for UploadFile
Source§impl From<MultipartData> for UploadFile
impl From<MultipartData> for UploadFile
Source§fn from(data: MultipartData) -> Self
fn from(data: MultipartData) -> Self
Converts to this type from the input type.
Source§impl From<UploadFile> for MultipartData
impl From<UploadFile> for MultipartData
Source§fn from(value: UploadFile) -> Self
fn from(value: UploadFile) -> Self
Converts to this type from the input type.
Source§impl ServerFn for UploadFile
impl ServerFn for UploadFile
Source§const PATH: &'static str
const PATH: &'static str
A unique path for the server function’s API endpoint, relative to the host, including its prefix.
Source§type Client = BrowserClient
type Client = BrowserClient
The type of the HTTP client that will send the request from the client side. Read more
Source§type ServerRequest = BrowserMockReq
type ServerRequest = BrowserMockReq
The type of the HTTP request when received by the server function on the server side.
Source§type ServerResponse = BrowserMockRes
type ServerResponse = BrowserMockRes
The type of the HTTP response returned by the server function on the server side.
Source§type InputEncoding = MultipartFormData
type InputEncoding = MultipartFormData
The
Encoding used in the request for arguments into the server function.Source§type OutputEncoding = Json
type OutputEncoding = Json
The
Encoding used in the response for the result of the server function.Source§type Error = NoCustomError
type Error = NoCustomError
The type of the custom error on
ServerFnError, if any. (If there is no
custom error type, this can be NoCustomError by default.)Source§fn middlewares() -> Vec<Arc<dyn Layer<BrowserMockReq, BrowserMockRes>>>
fn middlewares() -> Vec<Arc<dyn Layer<BrowserMockReq, BrowserMockRes>>>
Middleware that should be applied to this server function.
Source§async fn run_body(self) -> Result<Vec<(FileId, FileInfo)>, ServerFnError>
async fn run_body(self) -> Result<Vec<(FileId, FileInfo)>, ServerFnError>
The body of the server function. This will only run on the server.
Source§fn url() -> &'static str
fn url() -> &'static str
Returns
Self::PATH.Auto Trait Implementations§
impl Freeze for UploadFile
impl !RefUnwindSafe for UploadFile
impl Send for UploadFile
impl Sync for UploadFile
impl Unpin for UploadFile
impl !UnwindSafe for UploadFile
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
Source§impl<CustErr, T, Request> FromReq<MultipartFormData, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<MultipartFormData, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
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 more