pub struct PageResponse<T> { /* private fields */ }Expand description
Hybrid Saola page response: returns Envelope JSON for SPA/API requests, or renders the root
HTML shell view for initial browser document requests.
Implementations§
Source§impl<T: Serialize> PageResponse<T>
impl<T: Serialize> PageResponse<T>
pub fn new(view_key: impl Into<String>, data: T) -> Self
pub fn shell(self, template: impl Into<String>) -> Self
pub fn boot_config(self, boot_config: AppBootConfig) -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn locale(self, locale: impl Into<String>) -> Self
pub fn context(self, context: impl Into<String>) -> Self
pub fn auth(self, auth: ClientAuthProjection) -> Self
pub fn status(self, status: StatusCode) -> Self
pub fn view_revision(self, revision: impl Into<String>) -> Self
pub fn language_revision(self, revision: impl Into<String>) -> Self
pub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn into_envelope(self) -> Envelope<T>
pub fn into_response_for(self, request: &Request) -> Response
Trait Implementations§
Source§impl<T: Clone> Clone for PageResponse<T>
impl<T: Clone> Clone for PageResponse<T>
Auto Trait Implementations§
impl<T> Forget for PageResponse<T>
impl<T> Freeze for PageResponse<T>where
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
T: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
*const LeafNode<String, ClientGuardState> is !null: Freeze,
PhantomData<Box<(String, ClientGuardState)>>: Freeze,
NonZero<u16>: Freeze,
PhantomData<(String, String)>: Freeze,
impl<T> Move for PageResponse<T>
impl<T> RefUnwindSafe for PageResponse<T>
impl<T> Send for PageResponse<T>
impl<T> Sync for PageResponse<T>
impl<T> Unpin for PageResponse<T>
impl<T> UnsafeUnpin for PageResponse<T>where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
T: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
*const LeafNode<String, ClientGuardState> is !null: UnsafeUnpin,
PhantomData<Box<(String, ClientGuardState)>>: UnsafeUnpin,
NonZeroU16Inner: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl<T> UnwindSafe for PageResponse<T>where
RawVecInner: UnwindSafe,
T: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
NonNull<u8>: UnwindSafe,
BTreeMap<String, ClientGuardState>: UnwindSafe,
NonZero<u16>: 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