pub struct FactoryHashMapConnector<K, C, S = RandomState>where
C: FactoryComponent,{ /* private fields */ }Expand description
Second stage of the builder-pattern for building a FactoryHashMap.
Implementations§
Source§impl<K, C> FactoryHashMapConnector<K, C>where
C: FactoryComponent,
impl<K, C> FactoryHashMapConnector<K, C>where
C: FactoryComponent,
Sourcepub fn forward<F, Msg>(
self,
sender_: &Sender<Msg>,
f: F,
) -> FactoryHashMap<K, C>
pub fn forward<F, Msg>( self, sender_: &Sender<Msg>, f: F, ) -> FactoryHashMap<K, C>
Forwards output events to the designated sender.
Sourcepub fn detach(self) -> FactoryHashMap<K, C>
pub fn detach(self) -> FactoryHashMap<K, C>
Ignore outputs from the component and finish the builder.
Examples found in repository?
relm4/examples/factory_hash_map.rs (line 149)
144 fn init(
145 counter: Self::Init,
146 root: Self::Root,
147 sender: ComponentSender<Self>,
148 ) -> ComponentParts<Self> {
149 let counters = FactoryHashMap::builder().launch_default().detach();
150
151 let model = App {
152 created_widgets: counter,
153 counters,
154 entry_buffer: gtk::EntryBuffer::default(),
155 };
156
157 let counter_stack = model.counters.widget();
158 let widgets = view_output!();
159
160 ComponentParts { model, widgets }
161 }Trait Implementations§
Auto Trait Implementations§
impl<K, C, S> Freeze for FactoryHashMapConnector<K, C, S>
impl<K, C, S> RefUnwindSafe for FactoryHashMapConnector<K, C, S>
impl<K, C, S> Send for FactoryHashMapConnector<K, C, S>where
<C as FactoryComponent>::ParentWidget: Send,
S: Send,
K: Send,
<C as FactoryComponent>::Output: Send,
impl<K, C, S> Sync for FactoryHashMapConnector<K, C, S>where
<C as FactoryComponent>::ParentWidget: Sync,
S: Sync,
K: Sync,
<C as FactoryComponent>::Output: Send,
impl<K, C, S> Unpin for FactoryHashMapConnector<K, C, S>
impl<K, C, S> UnwindSafe for FactoryHashMapConnector<K, C, S>
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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