implement readable and callable for all structs in the hooks crate

This commit is contained in:
Evan Almloff committed 2024-03-08 11:17:28 -06:00
1 parent 98158bdc6f
commit ffc49530f6
13 files changed
+167 -491

No files matched your search

+10
View File
@@ -1,4 +1,5 @@
use crate::{read::Readable, ReadableRef, Signal, SignalData};
use dioxus_core::IntoDynNode;
use std::ops::Deref;
use dioxus_core::{prelude::IntoAttributeValue, ScopeId};
@@ -105,6 +106,15 @@ where
}
}
impl<T> IntoDynNode for ReadOnlySignal<T>
where
T: Clone + IntoDynNode,
{
fn into_dyn_node(self) -> dioxus_core::DynamicNode {
self().into_dyn_node()
}
}
impl<T: 'static, S: Storage<SignalData<T>>> PartialEq for ReadOnlySignal<T, S> {
fn eq(&self, other: &Self) -> bool {
self.inner == other.inner