pub struct LazyLoadingOptimizer {
pub lazy_classes: HashSet<String>,
pub strategies: Vec<LazyLoadingStrategy>,
pub observer_options: ObserverOptions,
pub preload_critical: bool,
}Expand description
Re-export core tailwind-rs functionality Lazy loading optimizer for performance
Fields§
§lazy_classes: HashSet<String>Classes to lazy load
strategies: Vec<LazyLoadingStrategy>Loading strategies
observer_options: ObserverOptionsIntersection observer options
preload_critical: boolPreload critical resources
Implementations§
Source§impl LazyLoadingOptimizer
impl LazyLoadingOptimizer
Sourcepub fn new() -> LazyLoadingOptimizer
pub fn new() -> LazyLoadingOptimizer
Create a new lazy loading optimizer
Sourcepub fn generate_lazy_loading_js(&self) -> String
pub fn generate_lazy_loading_js(&self) -> String
Generate lazy loading JavaScript
Sourcepub fn generate_lazy_loading_css(&self) -> String
pub fn generate_lazy_loading_css(&self) -> String
Generate lazy loading CSS
Trait Implementations§
Source§impl Clone for LazyLoadingOptimizer
impl Clone for LazyLoadingOptimizer
Source§fn clone(&self) -> LazyLoadingOptimizer
fn clone(&self) -> LazyLoadingOptimizer
Returns a duplicate 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 LazyLoadingOptimizer
impl Debug for LazyLoadingOptimizer
Source§impl Default for LazyLoadingOptimizer
impl Default for LazyLoadingOptimizer
Source§fn default() -> LazyLoadingOptimizer
fn default() -> LazyLoadingOptimizer
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LazyLoadingOptimizer
impl<'de> Deserialize<'de> for LazyLoadingOptimizer
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LazyLoadingOptimizer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LazyLoadingOptimizer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LazyLoadingOptimizer
impl PartialEq for LazyLoadingOptimizer
Source§impl Serialize for LazyLoadingOptimizer
impl Serialize for LazyLoadingOptimizer
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LazyLoadingOptimizer
Auto Trait Implementations§
impl Freeze for LazyLoadingOptimizer
impl RefUnwindSafe for LazyLoadingOptimizer
impl Send for LazyLoadingOptimizer
impl Sync for LazyLoadingOptimizer
impl Unpin for LazyLoadingOptimizer
impl UnwindSafe for LazyLoadingOptimizer
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