Feat: Make AttributeValue::Any usable (#565)
* Implemented Display for AttributeValue::Any * Make ArbitraryAttributeValue public * allow(missing_docs) for ArbitraryAttributeValue * Formatted lib.rs
This commit is contained in:
1 parent
28fba42e7e
commit
964a942243
2 files changed
+7
-5
No files matched your search
@@ -66,12 +66,13 @@ impl<'a> std::fmt::Display for AttributeValue<'a> {
|
|||||||
AttributeValue::Vec4Int(_, _, _, _) => todo!(),
|
AttributeValue::Vec4Int(_, _, _, _) => todo!(),
|
||||||
AttributeValue::Vec4Uint(_, _, _, _) => todo!(),
|
AttributeValue::Vec4Uint(_, _, _, _) => todo!(),
|
||||||
AttributeValue::Bytes(a) => write!(f, "{:?}", a),
|
AttributeValue::Bytes(a) => write!(f, "{:?}", a),
|
||||||
AttributeValue::Any(_) => todo!(),
|
AttributeValue::Any(a) => write!(f, "{:?}", a),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
|
#[allow(missing_docs)]
|
||||||
pub struct ArbitraryAttributeValue<'a> {
|
pub struct ArbitraryAttributeValue<'a> {
|
||||||
pub value: &'a dyn std::any::Any,
|
pub value: &'a dyn std::any::Any,
|
||||||
pub cmp: fn(&'a dyn std::any::Any, &'a dyn std::any::Any) -> bool,
|
pub cmp: fn(&'a dyn std::any::Any, &'a dyn std::any::Any) -> bool,
|
||||||
|
|||||||
@@ -63,10 +63,11 @@ pub(crate) mod innerlude {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub use crate::innerlude::{
|
pub use crate::innerlude::{
|
||||||
AnyEvent, Attribute, AttributeValue, Component, DioxusElement, DomEdit, Element, ElementId,
|
AnyEvent, ArbitraryAttributeValue, Attribute, AttributeValue, Component, DioxusElement,
|
||||||
ElementIdIterator, EventHandler, EventPriority, IntoVNode, LazyNodes, Listener, Mutations,
|
DomEdit, Element, ElementId, ElementIdIterator, EventHandler, EventPriority, IntoVNode,
|
||||||
NodeFactory, Properties, SchedulerMsg, Scope, ScopeId, ScopeState, TaskId, UiEvent, UserEvent,
|
LazyNodes, Listener, Mutations, NodeFactory, Properties, SchedulerMsg, Scope, ScopeId,
|
||||||
VComponent, VElement, VFragment, VNode, VPlaceholder, VText, VirtualDom,
|
ScopeState, TaskId, UiEvent, UserEvent, VComponent, VElement, VFragment, VNode, VPlaceholder,
|
||||||
|
VText, VirtualDom,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The purpose of this module is to alleviate imports of many common types
|
/// The purpose of this module is to alleviate imports of many common types
|
||||||
|
|||||||
Reference in new issue
Block a user