RecyclePool
struct · ferroui-controls-repeater · v0.5.0
struct RecyclePool
Keyed element pool that preserves the owner when the same panel reuses an element and detaches it when a different panel requests it.
Members
TYPEto_refput_element_coretry_get_element_corereuse_key_propertyconstructnewput_elementput_element_with_ownertry_get_elementtry_get_element_with_ownerget_reuse_keyset_reuse_keyget_origin_templateset_origin_templateget_pool_instanceset_pool_instancecount
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<RecyclePool>
Returns a strong reference to this object.
put_element_core
fn put_element_core(self: &Self, element: Ref<Control>, key: &str, owner: Option<Ref<Control>>) -> Result<(), ElementFactoryError>
try_get_element_core
fn try_get_element_core(self: &Self, key: &str, owner: Option<Ref<Control>>) -> Result<Option<Ref<Control>>, ElementFactoryError>
reuse_key_property
fn reuse_key_property() -> &'static AttachedProperty<String>
construct
fn construct() -> Self
new
fn new() -> Ref<Self>
put_element
fn put_element(self: &Self, element: Ref<Control>, key: &str) -> Result<(), ElementFactoryError>
put_element_with_owner
fn put_element_with_owner(self: &Self, element: Ref<Control>, key: &str, owner: Option<Ref<Control>>) -> Result<(), ElementFactoryError>
try_get_element
fn try_get_element(self: &Self, key: &str) -> Result<Option<Ref<Control>>, ElementFactoryError>
try_get_element_with_owner
fn try_get_element_with_owner(self: &Self, key: &str, owner: Option<Ref<Control>>) -> Result<Option<Ref<Control>>, ElementFactoryError>
get_reuse_key
fn get_reuse_key(element: &Control) -> String
set_reuse_key
fn set_reuse_key(element: &Control, key: impl Into<String>)
get_origin_template
fn get_origin_template(element: &Control) -> Option<Rc<dyn IDataTemplate>>
set_origin_template
fn set_origin_template(element: &Control, template: Option<Rc<dyn IDataTemplate>>)
get_pool_instance
fn get_pool_instance(template: &Rc<dyn IDataTemplate>) -> Option<Ref<Self>>
set_pool_instance
fn set_pool_instance(template: &Rc<dyn IDataTemplate>, pool: Option<Ref<Self>>)
count
fn count(self: &Self) -> usize
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeRecyclePoolImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<RecyclePool>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplRecyclePoolImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.