pub struct RouterDataInput {
pub token: String,
pub channel_id: Option<Uuid>,
pub key: Option<String>,
pub aps: Option<String>,
}
Expand description
Extracts the router data from the request body and validates the token against the given router’s token schema (taken from request path params).
Fields§
§token: String
§channel_id: Option<Uuid>
§key: Option<String>
§aps: Option<String>
Trait Implementations§
source§impl<'de> Deserialize<'de> for RouterDataInput
impl<'de> Deserialize<'de> for RouterDataInput
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromRequest for RouterDataInput
impl FromRequest for RouterDataInput
source§type Future = Pin<Box<dyn Future<Output = Result<RouterDataInput, <RouterDataInput as FromRequest>::Error>>>>
type Future = Pin<Box<dyn Future<Output = Result<RouterDataInput, <RouterDataInput as FromRequest>::Error>>>>
Future that resolves to a
Self
. Read moresource§fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future
Create a
Self
from request parts asynchronously.Auto Trait Implementations§
impl Freeze for RouterDataInput
impl RefUnwindSafe for RouterDataInput
impl Send for RouterDataInput
impl Sync for RouterDataInput
impl Unpin for RouterDataInput
impl UnwindSafe for RouterDataInput
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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