pub struct FrontendAssets { /* private fields */ }Expand description
The browser runtime an application serves: its bundle bytes, the tags that load them, and the inline CSS they need.
Implementations§
Source§impl FrontendAssets
impl FrontendAssets
Sourcepub fn new(config: &LivewireConfig, endpoints: Endpoints) -> Self
pub fn new(config: &LivewireConfig, endpoints: Endpoints) -> Self
The assets an application configured and the endpoints its routes registered.
Sourcepub fn styles(&self) -> Html
pub fn styles(&self) -> Html
The @livewireStyles markup: the exact inline <style> from upstream styles().
Sourcepub fn script_config(&self, csrf: &str, nonce: Option<&str>) -> String
pub fn script_config(&self, csrf: &str, nonce: Option<&str>) -> String
The @livewireScriptConfig body: window.livewireScriptConfig = {…};
Sourcepub fn scripts(
&self,
csrf: &str,
nonce: Option<&str>,
extra_attributes: &[(&str, &str)],
) -> Html
pub fn scripts( &self, csrf: &str, nonce: Option<&str>, extra_attributes: &[(&str, &str)], ) -> Html
The @livewireScripts markup: the <script> tags, with data-csrf,
data-update-uri, and data-module-url.
Trait Implementations§
Source§impl Clone for FrontendAssets
impl Clone for FrontendAssets
Auto Trait Implementations§
impl Forget for FrontendAssets
impl Freeze for FrontendAssetswhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
PhantomData<u8>: Freeze,
impl Move for FrontendAssets
impl RefUnwindSafe for FrontendAssets
impl Send for FrontendAssets
impl Sync for FrontendAssets
impl Unpin for FrontendAssets
impl UnsafeUnpin for FrontendAssetswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for FrontendAssets
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