Struct tailwind_css::CssBundle
source · [−]pub struct CssBundle { /* private fields */ }Expand description
A collection of css objects
Separate or merge as needed
Implementations
sourceimpl CssBundle
impl CssBundle
sourcepub fn insert(&mut self, item: CssInstance) -> bool
pub fn insert(&mut self, item: CssInstance) -> bool
insert new css instance to the html tag
sourcepub fn as_inlined(&self) -> (String, String)
pub fn as_inlined(&self) -> (String, String)
Try inline styles, keep the class name if that fails.
Returns
.0: css classes rest, maybe empty.1: css style
<img class="not-inlinable" style="k1:v1;k2:v2;"/>sourcepub fn as_data_key(&self)
pub fn as_data_key(&self)
sourcepub fn as_data_value(&self)
pub fn as_data_value(&self)
sourcepub fn set_inline(&mut self, inline: bool)
pub fn set_inline(&mut self, inline: bool)
Mark inline mode
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CssBundle
impl Send for CssBundle
impl Sync for CssBundle
impl Unpin for CssBundle
impl UnwindSafe for CssBundle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more