pub enum ServerSubmitOutcome<Rejection> {
Accepted,
Rejected(Rejection),
}Expand description
Server-side outcome for one submitted form value.
Transport failures are kept outside this type. A server function can return this as its successful transport payload so application rejections map into structured submit errors while operational failures stay on the explicit failure mapping path.
Variants§
Accepted
The server accepted the submitted value.
Rejected(Rejection)
The server rejected the submitted value with application-defined rejection details.
Implementations§
Trait Implementations§
Source§impl<Rejection: Clone> Clone for ServerSubmitOutcome<Rejection>
impl<Rejection: Clone> Clone for ServerSubmitOutcome<Rejection>
Source§fn clone(&self) -> ServerSubmitOutcome<Rejection>
fn clone(&self) -> ServerSubmitOutcome<Rejection>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<Rejection: Copy> Copy for ServerSubmitOutcome<Rejection>
Source§impl<Rejection: Debug> Debug for ServerSubmitOutcome<Rejection>
impl<Rejection: Debug> Debug for ServerSubmitOutcome<Rejection>
Source§impl<'de, Rejection> Deserialize<'de> for ServerSubmitOutcome<Rejection>where
Rejection: Deserialize<'de>,
impl<'de, Rejection> Deserialize<'de> for ServerSubmitOutcome<Rejection>where
Rejection: Deserialize<'de>,
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
impl<Rejection: Eq> Eq for ServerSubmitOutcome<Rejection>
Source§impl<Success, Rejection> From<Result<Success, Rejection>> for ServerSubmitOutcome<Rejection>
impl<Success, Rejection> From<Result<Success, Rejection>> for ServerSubmitOutcome<Rejection>
Source§impl<Rejection: PartialEq> PartialEq for ServerSubmitOutcome<Rejection>
impl<Rejection: PartialEq> PartialEq for ServerSubmitOutcome<Rejection>
Source§impl<Rejection> Serialize for ServerSubmitOutcome<Rejection>where
Rejection: Serialize,
impl<Rejection> Serialize for ServerSubmitOutcome<Rejection>where
Rejection: Serialize,
impl<Rejection: PartialEq> StructuralPartialEq for ServerSubmitOutcome<Rejection>
Auto Trait Implementations§
impl<Rejection> Freeze for ServerSubmitOutcome<Rejection>where
Rejection: Freeze,
impl<Rejection> RefUnwindSafe for ServerSubmitOutcome<Rejection>where
Rejection: RefUnwindSafe,
impl<Rejection> Send for ServerSubmitOutcome<Rejection>where
Rejection: Send,
impl<Rejection> Sync for ServerSubmitOutcome<Rejection>where
Rejection: Sync,
impl<Rejection> Unpin for ServerSubmitOutcome<Rejection>where
Rejection: Unpin,
impl<Rejection> UnsafeUnpin for ServerSubmitOutcome<Rejection>where
Rejection: UnsafeUnpin,
impl<Rejection> UnwindSafe for ServerSubmitOutcome<Rejection>where
Rejection: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.