pub struct StyleTransfer { /* private fields */ }Expand description
Applies patterns from one domain onto another by mapping ternary values.
Implementations§
Source§impl StyleTransfer
impl StyleTransfer
pub fn new() -> Self
Sourcepub fn add_rule(&mut self, source: &str, target: Ternary)
pub fn add_rule(&mut self, source: &str, target: Ternary)
Add a style rule: source value → target value.
Sourcepub fn apply(&self, pattern: &Pattern) -> Pattern
pub fn apply(&self, pattern: &Pattern) -> Pattern
Apply style rules to a pattern, replacing values that match rules.
Trait Implementations§
Source§impl Clone for StyleTransfer
impl Clone for StyleTransfer
Source§fn clone(&self) -> StyleTransfer
fn clone(&self) -> StyleTransfer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StyleTransfer
impl RefUnwindSafe for StyleTransfer
impl Send for StyleTransfer
impl Sync for StyleTransfer
impl Unpin for StyleTransfer
impl UnsafeUnpin for StyleTransfer
impl UnwindSafe for StyleTransfer
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