Struct bevy_replicon::server::connected_clients::ConnectedClients
source · pub struct ConnectedClients { /* private fields */ }
Expand description
Stores information about connected clients.
Implementations§
source§impl ConnectedClients
impl ConnectedClients
sourcepub fn visibility_policy(&self) -> VisibilityPolicy
pub fn visibility_policy(&self) -> VisibilityPolicy
Returns the configured VisibilityPolicy
.
sourcepub fn client(&self, client_id: ClientId) -> &ConnectedClient
pub fn client(&self, client_id: ClientId) -> &ConnectedClient
Returns a reference to a connected client.
This operation is O(n).
See also Self::get_client
for the fallible version.
§Panics
Panics if the passed client ID is not connected.
sourcepub fn client_mut(&mut self, client_id: ClientId) -> &mut ConnectedClient
pub fn client_mut(&mut self, client_id: ClientId) -> &mut ConnectedClient
Returns a mutable reference to a connected client.
This operation is O(n).
See also Self::get_client_mut
for the fallible version.
§Panics
Panics if the passed client ID is not connected.
sourcepub fn get_client(&self, client_id: ClientId) -> Option<&ConnectedClient>
pub fn get_client(&self, client_id: ClientId) -> Option<&ConnectedClient>
Returns a reference to a connected client.
This operation is O(n).
See also Self::client
for the panicking version.
sourcepub fn get_client_mut(
&mut self,
client_id: ClientId
) -> Option<&mut ConnectedClient>
pub fn get_client_mut( &mut self, client_id: ClientId ) -> Option<&mut ConnectedClient>
Returns a mutable reference to a connected client.
This operation is O(n).
See also Self::client
for the panicking version.
sourcepub fn iter_client_ids(&self) -> impl Iterator<Item = ClientId> + '_
pub fn iter_client_ids(&self) -> impl Iterator<Item = ClientId> + '_
Returns an iterator over client IDs.
sourcepub fn iter(&self) -> impl Iterator<Item = &ConnectedClient>
pub fn iter(&self) -> impl Iterator<Item = &ConnectedClient>
Returns an iterator over connected clients.
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut ConnectedClient>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut ConnectedClient>
Returns a mutable iterator over connected clients.
Trait Implementations§
source§impl Default for ConnectedClients
impl Default for ConnectedClients
source§fn default() -> ConnectedClients
fn default() -> ConnectedClients
impl Resource for ConnectedClients
Auto Trait Implementations§
impl Freeze for ConnectedClients
impl RefUnwindSafe for ConnectedClients
impl Send for ConnectedClients
impl Sync for ConnectedClients
impl Unpin for ConnectedClients
impl UnwindSafe for ConnectedClients
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
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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World
.