pub struct InertiaPage { /* private fields */ }
Expand description
Response containing a valid Inertia Payload that will be used by the Inertia client to render the components.
Implementations§
Source§impl InertiaPage
impl InertiaPage
Source§impl InertiaPage
impl InertiaPage
Sourcepub fn new(
component: Component,
url: String,
version: Option<String>,
props: Map<String, Value>,
) -> Self
pub fn new( component: Component, url: String, version: Option<String>, props: Map<String, Value>, ) -> Self
Instantiates an Inertia Page object to sent as http response, according to Inertia Protocol.
§Arguments
component
- The name of the javascript page component (e.g. “/Me”).url
- The Inertia instance’s url (the application URL). It can be a whole href or an absolute hostless path (“/me”).version
- Current assets version. Used to assert assets are up-to-date. See Inertia’s assets versioning page for more details.props
- A map of the page’s props.
Trait Implementations§
Source§impl Clone for InertiaPage
impl Clone for InertiaPage
Source§fn clone(&self) -> InertiaPage
fn clone(&self) -> InertiaPage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InertiaPage
impl Debug for InertiaPage
Source§impl<'de> Deserialize<'de> for InertiaPage
impl<'de> Deserialize<'de> for InertiaPage
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 PartialEq for InertiaPage
impl PartialEq for InertiaPage
Source§impl Responder for InertiaPage
impl Responder for InertiaPage
type Body = BoxBody
Source§fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body>
fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body>
Convert self to
HttpResponse
.Source§impl Serialize for InertiaPage
impl Serialize for InertiaPage
impl Eq for InertiaPage
impl StructuralPartialEq for InertiaPage
Auto Trait Implementations§
impl Freeze for InertiaPage
impl RefUnwindSafe for InertiaPage
impl Send for InertiaPage
impl Sync for InertiaPage
impl Unpin for InertiaPage
impl UnwindSafe for InertiaPage
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.