pub struct Union<O, E> {
pub output: O,
pub error: E,
}Expand description
A union type that is used as a simple target for the Rapid compiler to generate typescript types for route handlers
§Example
use rapid_web::types::Union;
type RapidOutput = Union<String, ErrorJsonBody>;Fields§
§output: O§error: ETrait Implementations§
Source§impl<'de, O, E> Deserialize<'de> for Union<O, E>where
O: Deserialize<'de>,
E: Deserialize<'de>,
impl<'de, O, E> Deserialize<'de> for Union<O, E>where
O: Deserialize<'de>,
E: 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
Auto Trait Implementations§
impl<O, E> Freeze for Union<O, E>
impl<O, E> RefUnwindSafe for Union<O, E>where
O: RefUnwindSafe,
E: RefUnwindSafe,
impl<O, E> Send for Union<O, E>
impl<O, E> Sync for Union<O, E>
impl<O, E> Unpin for Union<O, E>
impl<O, E> UnwindSafe for Union<O, E>where
O: UnwindSafe,
E: 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