#[non_exhaustive]pub struct ServerFnBody {Show 13 fields
pub attrs: Vec<Attribute>,
pub vis: Visibility,
pub ident: Ident,
pub generics: Generics,
pub inputs: Punctuated<ServerFnArg, Comma>,
pub return_ty: Type,
pub output_ty: Option<Type>,
pub error_ty: Option<Type>,
pub error_ws_in_ty: Option<Type>,
pub error_ws_out_ty: Option<Type>,
pub block: TokenStream,
pub docs: Vec<(String, Span)>,
pub middlewares: Vec<Middleware>,
/* private fields */
}Expand description
The body of a server function.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.attrs: Vec<Attribute>The attributes on the server function.
vis: VisibilityThe visibility of the server function.
ident: IdentThe name of the server function.
generics: GenericsThe generics of the server function.
inputs: Punctuated<ServerFnArg, Comma>The arguments to the server function.
return_ty: TypeThe return type of the server function.
output_ty: Option<Type>The Ok output type of the server function.
error_ty: Option<Type>The error output type of the server function.
error_ws_in_ty: Option<Type>The error type of WebSocket client-sent error
error_ws_out_ty: Option<Type>The error type of WebSocket server-sent error
block: TokenStreamThe body of the server function.
docs: Vec<(String, Span)>The documentation of the server function.
middlewares: Vec<Middleware>The middleware attributes applied to the server function.
Trait Implementations§
Source§impl Clone for ServerFnBody
impl Clone for ServerFnBody
Source§fn clone(&self) -> ServerFnBody
fn clone(&self) -> ServerFnBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerFnBody
impl Debug for ServerFnBody
Source§impl Parse for ServerFnBody
impl Parse for ServerFnBody
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl Freeze for ServerFnBody
impl RefUnwindSafe for ServerFnBody
impl !Send for ServerFnBody
impl !Sync for ServerFnBody
impl Unpin for ServerFnBody
impl UnwindSafe for ServerFnBody
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