Trait style::shared_lock::ToCssWithGuard

source ·
pub trait ToCssWithGuard {
    // Required method
    fn to_css(
        &self,
        guard: &SharedRwLockReadGuard<'_>,
        dest: &mut CssStringWriter,
    ) -> Result;

    // Provided method
    fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString { ... }
}
Expand description

Like ToCss, but with a lock guard given by the caller, and with the writer specified concretely rather than with a parameter.

Required Methods§

source

fn to_css( &self, guard: &SharedRwLockReadGuard<'_>, dest: &mut CssStringWriter, ) -> Result

Serialize self in CSS syntax, writing to dest, using the given lock guard.

Provided Methods§

source

fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString

Serialize self in CSS syntax using the given lock guard and return a string.

(This is a convenience wrapper for to_css and probably should not be overridden.)

Implementors§