pub struct StyleTable { /* private fields */ }Expand description
Style storage - maps style names to patterns
Implementations§
Source§impl StyleTable
impl StyleTable
pub fn new() -> Self
pub fn set( &mut self, pattern: &str, style: &str, values: Vec<String>, eval: bool, )
pub fn get(&self, context: &str, style: &str) -> Option<&[String]>
pub fn delete(&mut self, pattern: Option<&str>, style: Option<&str>)
pub fn list(&self, context: Option<&str>) -> Vec<(String, String, Vec<String>)>
pub fn list_styles(&self) -> Vec<&str>
pub fn list_patterns(&self) -> Vec<&str>
pub fn test(&self, context: &str, style: &str, values: Option<&[&str]>) -> bool
pub fn test_bool(&self, context: &str, style: &str) -> Option<bool>
Trait Implementations§
Source§impl Debug for StyleTable
impl Debug for StyleTable
Source§impl Default for StyleTable
impl Default for StyleTable
Source§fn default() -> StyleTable
fn default() -> StyleTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StyleTable
impl RefUnwindSafe for StyleTable
impl Send for StyleTable
impl Sync for StyleTable
impl Unpin for StyleTable
impl UnsafeUnpin for StyleTable
impl UnwindSafe for StyleTable
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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