pub struct ServerListProxyHelper<TClient: ICompositionObject + ?Sized> { /* private fields */ }Expand description
A helper used from generated UI-thread-side collections of composition objects.
The owner is passed to each mutating member instead of being held.
Implementations§
Source§impl<TClient: ICompositionObject + ?Sized> ServerListProxyHelper<TClient>
impl<TClient: ICompositionObject + ?Sized> ServerListProxyHelper<TClient>
pub fn new() -> Self
pub fn add(&self, parent: &dyn IRegisterForSerialization, item: Rc<TClient>)
pub fn clear(&self, parent: &dyn IRegisterForSerialization)
pub fn contains(&self, item: &Rc<TClient>) -> bool
Sourcepub fn copy_to(&self, array: &mut [Option<Rc<TClient>>], array_index: usize)
pub fn copy_to(&self, array: &mut [Option<Rc<TClient>>], array_index: usize)
Copies the items into array, starting at array_index. Panics if
they do not fit.
pub fn remove( &self, parent: &dyn IRegisterForSerialization, item: &Rc<TClient>, ) -> bool
pub fn count(&self) -> usize
pub fn is_read_only(&self) -> bool
Sourcepub fn index_of(&self, item: &Rc<TClient>) -> Option<usize>
pub fn index_of(&self, item: &Rc<TClient>) -> Option<usize>
The index of an item, compared by reference.
Sourcepub fn insert(
&self,
parent: &dyn IRegisterForSerialization,
index: usize,
item: Rc<TClient>,
)
pub fn insert( &self, parent: &dyn IRegisterForSerialization, index: usize, item: Rc<TClient>, )
Panics if index is greater than the count.
Sourcepub fn remove_at(&self, parent: &dyn IRegisterForSerialization, index: usize)
pub fn remove_at(&self, parent: &dyn IRegisterForSerialization, index: usize)
Panics if index is out of range.
Sourcepub fn set(
&self,
parent: &dyn IRegisterForSerialization,
index: usize,
value: Rc<TClient>,
)
pub fn set( &self, parent: &dyn IRegisterForSerialization, index: usize, value: Rc<TClient>, )
Panics if index is out of range.
pub fn serialize(&self, writer: &mut BatchStreamWriter<'_>)
Trait Implementations§
Source§impl<TClient: ICompositionObject + ?Sized> Default for ServerListProxyHelper<TClient>
impl<TClient: ICompositionObject + ?Sized> Default for ServerListProxyHelper<TClient>
Auto Trait Implementations§
impl<TClient> !Freeze for ServerListProxyHelper<TClient>
impl<TClient> !RefUnwindSafe for ServerListProxyHelper<TClient>
impl<TClient> !Send for ServerListProxyHelper<TClient>
impl<TClient> !Sync for ServerListProxyHelper<TClient>
impl<TClient> Unpin for ServerListProxyHelper<TClient>
impl<TClient> UnsafeUnpin for ServerListProxyHelper<TClient>
impl<TClient> UnwindSafe for ServerListProxyHelper<TClient>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more