[][src]Struct svgbob::Property

pub struct Property {
    pub ch: char,
    pub behavior: Arc<dyn Fn(&Settings, &Property, &Property, &Property, &Property, &Property, &Property, &Property, &Property) -> Vec<(bool, Vec<Fragment>)> + Sync + Send>,
    // some fields omitted
}

Fields

ch: charbehavior: Arc<dyn Fn(&Settings, &Property, &Property, &Property, &Property, &Property, &Property, &Property, &Property) -> Vec<(bool, Vec<Fragment>)> + Sync + Send>

behavior is the final output of fragments of the spot character depending on flag that is meet when checked agains the surrounding characters

Methods

impl Property[src]

pub fn new(
    ch: char,
    signature: Vec<(Signal, Vec<Fragment>)>,
    behavior: Arc<dyn Fn(&Settings, &Property, &Property, &Property, &Property, &Property, &Property, &Property, &Property) -> Vec<(bool, Vec<Fragment>)> + Sync + Send>
) -> Self
[src]

pub fn empty() -> Self[src]

empty property serves as a substitue for None property for simplicity in the behavior code, never have to deal with Option

Trait Implementations

impl Clone for Property[src]

impl Debug for Property[src]

Auto Trait Implementations

impl !RefUnwindSafe for Property

impl Send for Property

impl Sync for Property

impl Unpin for Property

impl !UnwindSafe for Property

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.