pub(crate) struct ClientStore<D: 'static> {
clients: Vec<Option<Client<D>>>,
last_serial: u32,
debug: bool,
}Fields§
§clients: Vec<Option<Client<D>>>§last_serial: u32§debug: boolImplementations§
Source§impl<D> ClientStore<D>
impl<D> ClientStore<D>
pub(crate) fn new(debug: bool) -> Self
pub(crate) fn create_client( &mut self, stream: UnixStream, data: Arc<dyn ClientData>, ) -> InnerClientId
pub(crate) fn get_client( &self, id: InnerClientId, ) -> Result<&Client<D>, InvalidId>
pub(crate) fn get_client_mut( &mut self, id: InnerClientId, ) -> Result<&mut Client<D>, InvalidId>
pub(crate) fn cleanup( &mut self, pending_destructors: &mut Vec<(Arc<dyn ObjectData<D>>, InnerClientId, InnerObjectId)>, ) -> SmallVec<[Client<D>; 1]> ⓘ
fn next_serial(&mut self) -> u32
pub(crate) fn clients_mut(&mut self) -> impl Iterator<Item = &mut Client<D>>
pub(crate) fn all_clients_id(&self) -> impl Iterator<Item = ClientId> + '_
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for ClientStore<D>
impl<D> !RefUnwindSafe for ClientStore<D>
impl<D> Send for ClientStore<D>
impl<D> Sync for ClientStore<D>
impl<D> Unpin for ClientStore<D>
impl<D> !UnwindSafe for ClientStore<D>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.