pub struct ServerEndpoint<T> { /* private fields */ }Expand description
Typed operation input. Dispatch decodes the final input after before-hook patches.
Implementations§
Source§impl<T> ServerEndpoint<T>
impl<T> ServerEndpoint<T>
pub const fn new(plugin: &'static str, name: &'static str) -> Self
Sourcepub fn with_body(self, body: &impl Serialize) -> AuthResult<Self>
pub fn with_body(self, body: &impl Serialize) -> AuthResult<Self>
§Errors
Returns an error if application input cannot be serialized.
Sourcepub fn with_query(self, query: &impl Serialize) -> AuthResult<Self>
pub fn with_query(self, query: &impl Serialize) -> AuthResult<Self>
§Errors
Returns an error if application input cannot be serialized.
pub fn with_body_value(self, body: JsValue) -> Self
pub fn with_query_value(self, query: JsValue) -> Self
Sourcepub fn with_params(self, params: &impl Serialize) -> AuthResult<Self>
pub fn with_params(self, params: &impl Serialize) -> AuthResult<Self>
Supply logical path parameters independently of an HTTP request.
§Errors
Returns an error if application input cannot be serialized.
pub fn with_params_value(self, params: JsValue) -> Self
pub const fn params(&self) -> Option<&JsValue>
pub const fn plugin(&self) -> &'static str
pub const fn name(&self) -> &'static str
pub fn input(self) -> (Option<JsValue>, Option<JsValue>)
Trait Implementations§
Source§impl<T: Clone> Clone for ServerEndpoint<T>
impl<T: Clone> Clone for ServerEndpoint<T>
Auto Trait Implementations§
impl<T> Freeze for ServerEndpoint<T>
impl<T> RefUnwindSafe for ServerEndpoint<T>
impl<T> Send for ServerEndpoint<T>
impl<T> Sync for ServerEndpoint<T>
impl<T> Unpin for ServerEndpoint<T>
impl<T> UnsafeUnpin for ServerEndpoint<T>
impl<T> UnwindSafe for ServerEndpoint<T>
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