Struct UploadFile

Source
pub struct UploadFile {
    pub data: MultipartData,
}
Expand description

Serialized arguments for the [upload_file] server function.

Fields§

§data: MultipartData

Trait Implementations§

Source§

impl Debug for UploadFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<MultipartData> for UploadFile

Source§

fn from(data: MultipartData) -> Self

Converts to this type from the input type.
Source§

impl From<UploadFile> for MultipartData

Source§

fn from(value: UploadFile) -> Self

Converts to this type from the input type.
Source§

impl ServerFn for UploadFile

Source§

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

The type of the HTTP client that will send the request from the client side. Read more
Source§

type ServerRequest = BrowserMockReq

The type of the HTTP request when received by the server function on the server side.
Source§

type ServerResponse = BrowserMockRes

The type of the HTTP response returned by the server function on the server side.
Source§

type Output = Vec<(FileId, FileInfo)>

The return type of the server function. Read more
Source§

type InputEncoding = MultipartFormData

The Encoding used in the request for arguments into the server function.
Source§

type OutputEncoding = Json

The Encoding used in the response for the result of the server function.
Source§

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>>>

Middleware that should be applied to this server function.
Source§

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

Returns Self::PATH.

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<CustErr, T, Request> FromReq<MultipartFormData, Request, CustErr> for T
where Request: Req<CustErr> + Send + 'static, T: From<MultipartData>, CustErr: 'static,

Source§

async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the arguments from a request.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<CustErr, T, Request> IntoReq<MultipartFormData, Request, CustErr> for T
where Request: ClientReq<CustErr, FormData = BrowserFormData>, T: Into<MultipartData>,

Source§

fn into_req( self, path: &str, accepts: &str, ) -> Result<Request, ServerFnError<CustErr>>

Attempts to serialize the arguments into an HTTP request.
Source§

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

Source§

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>,

Source§

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
Source§

impl<El> ElementDescriptorBounds for El
where El: Debug,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,