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
@@ -3,6 +3,7 @@ use crate::{
ReadableRef,
};
use crate::{Memo, WritableRef};
use dioxus_core::IntoDynNode;
use dioxus_core::{prelude::IntoAttributeValue, ScopeId};
use generational_box::{AnyStorage, Storage, SyncStorage, UnsyncStorage};
use std::{
@@ -245,6 +246,15 @@ where
}
}
impl<T> IntoDynNode for Signal<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 Signal<T, S> {
fn eq(&self, other: &Self) -> bool {
self.inner == other.inner