Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement IntoSplitSignal for Field. #3364

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion tachys/src/reactive_graph/bind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
wrappers::read::Signal,
};
#[cfg(feature = "reactive_stores")]
use reactive_stores::{KeyedSubfield, Subfield};
use reactive_stores::{ArcField, Field, KeyedSubfield, Subfield};
use send_wrapper::SendWrapper;
use wasm_bindgen::JsValue;

Expand Down Expand Up @@ -358,6 +358,21 @@
}
}

#[cfg(feature = "reactive_stores")]
impl<T, S> IntoSplitSignal for Field<T, S>
where
Self: Get<Value = T> + Update<Value = T> + Clone,
S: Storage<ArcField<T>>,

Check failure on line 365 in tachys/src/reactive_graph/bind.rs

View workflow job for this annotation

GitHub Actions / autofix

cannot find trait `Storage` in this scope
{
type Value = T;
type Read = Self;
type Write = Self;

fn into_split_signal(self) -> (Self::Read, Self::Write) {
(self.clone(), self.clone())
}
}

#[cfg(feature = "reactive_stores")]
impl<Inner, Prev, K, T> IntoSplitSignal for KeyedSubfield<Inner, Prev, K, T>
where
Expand Down
Loading