pub struct LivewireConfig {Show 20 fields
pub component_locations: Vec<String>,
pub component_namespaces: BTreeMap<String, String>,
pub component_layout: Option<String>,
pub component_placeholder: Option<String>,
pub make_command: MakeCommand,
pub component_path: String,
pub view_path: String,
pub temporary_file_upload: TemporaryFileUpload,
pub render_on_redirect: bool,
pub legacy_model_binding: bool,
pub inject_assets: bool,
pub navigate: Navigate,
pub inject_morph_markers: bool,
pub smart_wire_keys: bool,
pub pagination_theme: PaginationTheme,
pub release_token: String,
pub csp_safe: bool,
pub asset_url: Option<String>,
pub update_uri: Option<String>,
pub payload: PayloadLimits,
}Expand description
Everything the livewire section configures.
The defaults match upstream Livewire’s config/livewire.php. An application replaces any of
them with a livewire config section of its own, or by changing the section in
with_config.
Fields§
§component_locations: Vec<String>The directories that hold view components, searched in order.
component_namespaces: BTreeMap<String, String>Namespaces that resolve relative to a directory, such as layouts to
resources/views/layouts.
component_layout: Option<String>The view that wraps a page component, or None to render the component alone.
component_placeholder: Option<String>The view a lazy component shows before it loads, or None for the built-in placeholder.
make_command: MakeCommandThe defaults of make:livewire.
component_path: StringWhere make:livewire writes component modules.
view_path: StringWhere make:livewire writes .livewire views.
temporary_file_upload: TemporaryFileUploadHow temporary uploads are stored and validated.
render_on_redirect: boolWhether to render a component that redirected, before answering with the redirect.
legacy_model_binding: boolWhether wire:model may bind a model directly, as Livewire 2 did.
inject_assets: boolWhether the server injects its styles and scripts into HTML responses.
How wire:navigate presents a visit.
inject_morph_markers: boolWhether to inject morph markers around conditionals, loops, and class output.
smart_wire_keys: boolWhether to derive keys for nested components inside loops.
pagination_theme: PaginationThemeThe CSS framework the pagination views target.
release_token: StringThe token in each snapshot that a redeployment changes.
csp_safe: boolWhether to serve and run the CSP-safe Alpine build.
asset_url: Option<String>A base URL that serves the frontend assets from somewhere other than the application.
update_uri: Option<String>A path for the update endpoint other than the default one.
payload: PayloadLimitsThe limits that guard the update endpoint against oversized requests.
Implementations§
Source§impl LivewireConfig
impl LivewireConfig
Sourcepub fn of(config: &Config) -> &Self
pub fn of(config: &Config) -> &Self
The livewire section of a framework configuration, or the defaults when the application
never set one.
Sourcepub fn first_component_location(&self) -> Option<&str>
pub fn first_component_location(&self) -> Option<&str>
The first configured component directory, which make:livewire writes new components to.
Sourcepub fn upload_throttle(&self) -> Option<Throttle>
pub fn upload_throttle(&self) -> Option<Throttle>
The temporary_file_upload.middleware as a route throttle, or None when the
configuration names no allowed attempts.
Trait Implementations§
Source§impl Clone for LivewireConfig
impl Clone for LivewireConfig
Source§impl Debug for LivewireConfig
impl Debug for LivewireConfig
Source§impl Default for LivewireConfig
impl Default for LivewireConfig
impl Eq for LivewireConfig
Source§impl PartialEq for LivewireConfig
impl PartialEq for LivewireConfig
impl StructuralPartialEq for LivewireConfig
Auto Trait Implementations§
impl Forget for LivewireConfig
impl Freeze for LivewireConfigwhere
*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 LivewireConfig
impl RefUnwindSafe for LivewireConfig
impl Send for LivewireConfig
impl Sync for LivewireConfig
impl Unpin for LivewireConfig
impl UnsafeUnpin for LivewireConfigwhere
*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 LivewireConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.