mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
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:
parent
28fba42e7e
commit
964a942243
2 changed files with 7 additions and 5 deletions
|
@ -66,12 +66,13 @@ impl<'a> std::fmt::Display for AttributeValue<'a> {
|
|||
AttributeValue::Vec4Int(_, _, _, _) => todo!(),
|
||||
AttributeValue::Vec4Uint(_, _, _, _) => todo!(),
|
||||
AttributeValue::Bytes(a) => write!(f, "{:?}", a),
|
||||
AttributeValue::Any(_) => todo!(),
|
||||
AttributeValue::Any(a) => write!(f, "{:?}", a),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
#[allow(missing_docs)]
|
||||
pub struct ArbitraryAttributeValue<'a> {
|
||||
pub value: &'a dyn std::any::Any,
|
||||
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::{
|
||||
AnyEvent, Attribute, AttributeValue, Component, DioxusElement, DomEdit, Element, ElementId,
|
||||
ElementIdIterator, EventHandler, EventPriority, IntoVNode, LazyNodes, Listener, Mutations,
|
||||
NodeFactory, Properties, SchedulerMsg, Scope, ScopeId, ScopeState, TaskId, UiEvent, UserEvent,
|
||||
VComponent, VElement, VFragment, VNode, VPlaceholder, VText, VirtualDom,
|
||||
AnyEvent, ArbitraryAttributeValue, Attribute, AttributeValue, Component, DioxusElement,
|
||||
DomEdit, Element, ElementId, ElementIdIterator, EventHandler, EventPriority, IntoVNode,
|
||||
LazyNodes, Listener, Mutations, NodeFactory, Properties, SchedulerMsg, Scope, ScopeId,
|
||||
ScopeState, TaskId, UiEvent, UserEvent, VComponent, VElement, VFragment, VNode, VPlaceholder,
|
||||
VText, VirtualDom,
|
||||
};
|
||||
|
||||
/// The purpose of this module is to alleviate imports of many common types
|
||||
|
|
Loading…
Reference in a new issue