pub struct Component<TConfig, TMsg>where
TMsg: MsgDataBound,{ /* private fields */ }
Expand description
Представление обобщенного компонента
Implementations§
Trait Implementations§
Source§impl<TMessage> IComponentProcess<Config<TMessage>, TMessage> for Component<Config<TMessage>, TMessage>where
TMessage: MsgDataBound + 'static,
impl<TMessage> IComponentProcess<Config<TMessage>, TMessage> for Component<Config<TMessage>, TMessage>where
TMessage: MsgDataBound + 'static,
Source§impl<TMessage, TServerToClient, TClientToServer> IComponentProcess<Config<TMessage, TServerToClient, TClientToServer>, TMessage> for Component<Config<TMessage, TServerToClient, TClientToServer>, TMessage>where
TMessage: MsgDataBound + 'static,
TServerToClient: 'static + WebsocketMessage,
TClientToServer: 'static + WebsocketMessage,
impl<TMessage, TServerToClient, TClientToServer> IComponentProcess<Config<TMessage, TServerToClient, TClientToServer>, TMessage> for Component<Config<TMessage, TServerToClient, TClientToServer>, TMessage>where
TMessage: MsgDataBound + 'static,
TServerToClient: 'static + WebsocketMessage,
TClientToServer: 'static + WebsocketMessage,
Source§fn process<'life0, 'async_trait>(
&'life0 self,
config: Config<TMessage, TServerToClient, TClientToServer>,
input: CmpInOut<TMessage>,
) -> Pin<Box<dyn Future<Output = Result<(), ComponentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 self,
config: Config<TMessage, TServerToClient, TClientToServer>,
input: CmpInOut<TMessage>,
) -> Pin<Box<dyn Future<Output = Result<(), ComponentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Основная функция компонента
Source§impl<TMessage, TServerToClient, TClientToServer> IComponentProcess<Config<TMessage, TServerToClient, TClientToServer>, TMessage> for Component<Config<TMessage, TServerToClient, TClientToServer>, TMessage>where
TMessage: MsgDataBound + 'static,
TServerToClient: 'static + WebsocketMessage,
TClientToServer: 'static + WebsocketMessage,
impl<TMessage, TServerToClient, TClientToServer> IComponentProcess<Config<TMessage, TServerToClient, TClientToServer>, TMessage> for Component<Config<TMessage, TServerToClient, TClientToServer>, TMessage>where
TMessage: MsgDataBound + 'static,
TServerToClient: 'static + WebsocketMessage,
TClientToServer: 'static + WebsocketMessage,
Source§fn process<'life0, 'async_trait>(
&'life0 self,
config: Config<TMessage, TServerToClient, TClientToServer>,
input: CmpInOut<TMessage>,
) -> Pin<Box<dyn Future<Output = Result<(), ComponentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 self,
config: Config<TMessage, TServerToClient, TClientToServer>,
input: CmpInOut<TMessage>,
) -> Pin<Box<dyn Future<Output = Result<(), ComponentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Основная функция компонента
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,
Компонент для добавления сообщений из побочного потока
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,
Source§impl<TMsg> IComponentProcess<Config<TMsg>, TMsg> for Component<Config<TMsg>, TMsg>where
TMsg: MsgDataBound,
impl<TMsg> IComponentProcess<Config<TMsg>, TMsg> for Component<Config<TMsg>, TMsg>where
TMsg: MsgDataBound,
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,
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,
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,
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,
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,
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,
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,
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,
Source§impl<TMsg> IComponentProcess<Config<TMsg>, TMsg> for Component<Config<TMsg>, TMsg>where
TMsg: MsgDataBound,
impl<TMsg> IComponentProcess<Config<TMsg>, TMsg> for Component<Config<TMsg>, TMsg>where
TMsg: MsgDataBound,
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,
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,
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,
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,
Source§impl<TMsg, I, Q, S> IComponentProcess<Config<TMsg, I, Q, S>, TMsg> for Component<Config<TMsg, I, Q, S>, TMsg>
impl<TMsg, I, Q, S> IComponentProcess<Config<TMsg, I, Q, S>, TMsg> for Component<Config<TMsg, I, Q, S>, TMsg>
Source§impl<TMsg, TBuffer> IComponentProcess<Config<TMsg, TBuffer>, TMsg> for Component<Config<TMsg, TBuffer>, TMsg>where
TMsg: MsgDataBound + 'static,
TBuffer: BufferBound,
impl<TMsg, TBuffer> IComponentProcess<Config<TMsg, TBuffer>, TMsg> for Component<Config<TMsg, TBuffer>, TMsg>where
TMsg: MsgDataBound + 'static,
TBuffer: BufferBound,
Source§impl<TMsg, TFnPeriodic> IComponentProcess<Config<TMsg, TFnPeriodic>, TMsg> for Component<Config<TMsg, TFnPeriodic>, TMsg>
impl<TMsg, TFnPeriodic> IComponentProcess<Config<TMsg, TFnPeriodic>, TMsg> for Component<Config<TMsg, TFnPeriodic>, TMsg>
Source§impl<TMainWindow, TMsg> IComponentProcess<Config<TMsg, TMainWindow>, TMsg> for Component<Config<TMsg, TMainWindow>, TMsg>where
TMsg: MsgDataBound + 'static,
Self: Sync,
TMainWindow: ComponentHandle + 'static,
impl<TMainWindow, TMsg> IComponentProcess<Config<TMsg, TMainWindow>, TMsg> for Component<Config<TMsg, TMainWindow>, TMsg>where
TMsg: MsgDataBound + 'static,
Self: Sync,
TMainWindow: ComponentHandle + 'static,
Source§impl<TMsg> IComponentProcess<Config, TMsg> for Component<Config, TMsg>where
TMsg: MsgDataBound + 'static,
impl<TMsg> IComponentProcess<Config, TMsg> for Component<Config, TMsg>where
TMsg: MsgDataBound + 'static,
Auto Trait Implementations§
impl<TConfig, TMsg> Freeze for Component<TConfig, TMsg>where
TConfig: Freeze,
impl<TConfig, TMsg> !RefUnwindSafe for Component<TConfig, TMsg>
impl<TConfig, TMsg> Send for Component<TConfig, TMsg>where
TConfig: Send,
impl<TConfig, TMsg> Sync for Component<TConfig, TMsg>where
TConfig: Sync,
impl<TConfig, TMsg> Unpin for Component<TConfig, TMsg>where
TConfig: Unpin,
impl<TConfig, TMsg> !UnwindSafe for Component<TConfig, 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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Erasable for T
impl<T> Erasable for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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