pub struct Config<TMainWindow, TMsg>where
Self: Sync,
TMsg: MsgDataBound,
TMainWindow: ComponentHandle,{
pub instance: Arc<Mutex<Weak<TMainWindow>>>,
pub fn_input: fn(_: Message<TMsg>, _: MutexGuard<'_, Weak<TMainWindow>>),
pub fn_output: fn(_: MutexGuard<'_, Weak<TMainWindow>>, _: Sender<Message<TMsg>>),
}
Expand description
Настройки компонента cmp_slint
Fields§
§instance: Arc<Mutex<Weak<TMainWindow>>>
Ссылка на главное окно
fn_input: fn(_: Message<TMsg>, _: MutexGuard<'_, Weak<TMainWindow>>)
Функция обработки входящих сообщений
fn_output: fn(_: MutexGuard<'_, Weak<TMainWindow>>, _: Sender<Message<TMsg>>)
Функция генерирования исходящих сообщений
Trait Implementations§
Source§impl<TMainWindow, TMsg> Clone for Config<TMainWindow, TMsg>where
TMsg: MsgDataBound,
TMainWindow: ComponentHandle,
impl<TMainWindow, TMsg> Clone for Config<TMainWindow, TMsg>where
TMsg: MsgDataBound,
TMainWindow: ComponentHandle,
Source§impl<TMainWindow, TMsg, TService> IComponentProcess<Config<TMainWindow, TMsg>, TMsg, TService> for Component<Config<TMainWindow, TMsg>, TMsg, TService>where
TMsg: MsgDataBound + 'static,
TService: ServiceBound + 'static,
Self: Sync,
TMainWindow: ComponentHandle + 'static,
impl<TMainWindow, TMsg, TService> IComponentProcess<Config<TMainWindow, TMsg>, TMsg, TService> for Component<Config<TMainWindow, TMsg>, TMsg, TService>where
TMsg: MsgDataBound + 'static,
TService: ServiceBound + 'static,
Self: Sync,
TMainWindow: ComponentHandle + 'static,
Auto Trait Implementations§
impl<TMainWindow, TMsg> Freeze for Config<TMainWindow, TMsg>
impl<TMainWindow, TMsg> !RefUnwindSafe for Config<TMainWindow, TMsg>
impl<TMainWindow, TMsg> Send for Config<TMainWindow, TMsg>
impl<TMainWindow, TMsg> Sync for Config<TMainWindow, TMsg>
impl<TMainWindow, TMsg> Unpin for Config<TMainWindow, TMsg>
impl<TMainWindow, TMsg> !UnwindSafe for Config<TMainWindow, 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