pub struct Config<TMsg>where
TMsg: MsgDataBound,{
pub file: &'static str,
pub fn_input: fn(&TMsg) -> Vec<SvgChange>,
pub fn_output: fn(&[u8]) -> TMsg,
}Expand description
Конфигурация компонента cmp_svg
Fields§
§file: &'static strФайл с документом SVG
Можно прочитать:
include_str!("../files/input.svg")fn_input: fn(&TMsg) -> Vec<SvgChange>Функция преобразования входящих сообщений в изменения SVG
fn_output: fn(&[u8]) -> TMsgФункция преобразования изменённого файла SVG в исходящее сообщение.
Файл передаётся как Vec<u8>
Trait Implementations§
Source§impl<TMsg> IComponentProcess<Config<TMsg>, TMsg> for Component<Config<TMsg>, TMsg>where
TMsg: MsgDataBound + 'static,
impl<TMsg> IComponentProcess<Config<TMsg>, TMsg> for Component<Config<TMsg>, TMsg>where
TMsg: MsgDataBound + 'static,
Auto Trait Implementations§
impl<TMsg> Freeze for Config<TMsg>
impl<TMsg> RefUnwindSafe for Config<TMsg>
impl<TMsg> Send for Config<TMsg>
impl<TMsg> Sync for Config<TMsg>
impl<TMsg> Unpin for Config<TMsg>
impl<TMsg> UnsafeUnpin for Config<TMsg>
impl<TMsg> UnwindSafe for Config<TMsg>
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