mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 22:09:22 -05:00
feat: impl from Signal
and WriteSignal
for Model
(#179)
This commit is contained in:
parent
10a8aa402a
commit
92f2812acf
1 changed files with 10 additions and 0 deletions
|
@ -132,6 +132,16 @@ impl<T> From<RwSignal<T>> for Model<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> From<(Signal<T>, WriteSignal<T>)> for Model<T> {
|
||||
fn from((read, write): (Signal<T>, WriteSignal<T>)) -> Self {
|
||||
Self {
|
||||
read,
|
||||
write,
|
||||
on_write: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<(ReadSignal<T>, WriteSignal<T>)> for Model<T> {
|
||||
fn from((read, write): (ReadSignal<T>, WriteSignal<T>)) -> Self {
|
||||
Self {
|
||||
|
|
Loading…
Add table
Reference in a new issue