pub struct ImportProcessor { /* private fields */ }Expand description
Main import processor for handling @import statements
Implementations§
Source§impl ImportProcessor
impl ImportProcessor
Sourcepub fn with_config(config: ImportConfig) -> Self
pub fn with_config(config: ImportConfig) -> Self
Create a new import processor with custom configuration
Sourcepub fn process_imports(
&mut self,
css: &str,
base_path: &str,
) -> Result<String, ImportError>
pub fn process_imports( &mut self, css: &str, base_path: &str, ) -> Result<String, ImportError>
Process @import statements in CSS
Sourcepub fn process_imports_advanced(
&mut self,
css: &str,
options: &ImportOptions,
) -> Result<ImportResult, ImportError>
pub fn process_imports_advanced( &mut self, css: &str, options: &ImportOptions, ) -> Result<ImportResult, ImportError>
Process imports with advanced options
Sourcepub fn resolve_import_path(
&self,
import_path: &str,
base_path: &str,
) -> Result<String, ImportError>
pub fn resolve_import_path( &self, import_path: &str, base_path: &str, ) -> Result<String, ImportError>
Resolve import path
Sourcepub fn optimize_imports(&self, css: &str) -> Result<String, ImportError>
pub fn optimize_imports(&self, css: &str) -> Result<String, ImportError>
Optimize imports by removing duplicates and unused imports
Auto Trait Implementations§
impl Freeze for ImportProcessor
impl RefUnwindSafe for ImportProcessor
impl Send for ImportProcessor
impl Sync for ImportProcessor
impl Unpin for ImportProcessor
impl UnwindSafe for ImportProcessor
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more