pub struct Client {
pub entity: Entity,
pub ecs: Arc<Mutex<RawMutex, World>>,
}Expand description
A Minecraft client instance that can interact with the world.
To make a new client, use either azalea::ClientBuilder or
Client::join.
Note that Client is inaccessible from systems (i.e. plugins), but you can
achieve everything that client can do with ECS events.
Fields§
§entity: EntityThe entity for this client in the ECS.
ecs: Arc<Mutex<RawMutex, World>>A mutually exclusive reference to the entity component system (ECS).
You probably don’t need to access this directly. Note that if you’re using a shared world (i.e. a swarm), the ECS will contain all entities in all instances/dimensions.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(entity: Entity, ecs: Arc<Mutex<RawMutex, World>>) -> Client
pub fn new(entity: Entity, ecs: Arc<Mutex<RawMutex, World>>) -> Client
Create a new client from the given GameProfile, ECS Entity, ECS
World, and schedule runner function.
You should only use this if you want to change these fields from the
defaults, otherwise use Client::join.
Sourcepub async fn join(
account: Account,
address: impl TryInto<ServerAddress>,
) -> Result<(Client, UnboundedReceiver<Event>), JoinError>
pub async fn join( account: Account, address: impl TryInto<ServerAddress>, ) -> Result<(Client, UnboundedReceiver<Event>), JoinError>
Connect to a Minecraft server.
To change the render distance and other settings, use
Client::set_client_information. To watch for events like packets
sent by the server, use the rx variable this function returns.
§Examples
use azalea_client::{Account, Client};
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let account = Account::offline("bot");
let (client, rx) = Client::join(account, "localhost").await?;
client.chat("Hello, world!");
client.disconnect();
Ok(())
}pub async fn join_with_proxy( account: Account, address: impl TryInto<ServerAddress>, proxy: Proxy, ) -> Result<(Client, UnboundedReceiver<Event>), JoinError>
Sourcepub async fn start_client(__arg0: StartClientOpts) -> Client
pub async fn start_client(__arg0: StartClientOpts) -> Client
Create a Client when you already have the ECS made with
[start_ecs_runner]. You’d usually want to use Self::join instead.
Sourcepub fn write_packet(&self, packet: impl Packet<ServerboundGamePacket>)
pub fn write_packet(&self, packet: impl Packet<ServerboundGamePacket>)
Write a packet directly to the server.
Sourcepub fn disconnect(&self)
pub fn disconnect(&self)
Disconnect this client from the server by ending all tasks.
The OwnedReadHalf for the TCP connection is in one of the tasks, so it automatically closes the connection when that’s dropped.
pub fn with_raw_connection<R>(&self, f: impl FnOnce(&RawConnection) -> R) -> R
pub fn with_raw_connection_mut<R>( &self, f: impl FnOnce(Mut<'_, RawConnection>) -> R, ) -> R
Sourcepub fn component<T>(&self) -> T
pub fn component<T>(&self) -> T
Get a component from this client. This will clone the component and return it.
If the component can’t be cloned, try Self::query_self instead.
If it isn’t guaranteed to be present, you can use
Self::get_component or Self::query_self.
You may also use Self::ecs directly if you need more control over
when the ECS is locked.
§Panics
This will panic if the component doesn’t exist on the client.
§Examples
let world_name = client.component::<InstanceName>();Sourcepub fn get_component<T>(&self) -> Option<T>
pub fn get_component<T>(&self) -> Option<T>
Get a component from this client, or None if it doesn’t exist.
If the component can’t be cloned, consider using Self::query_self
with Option<&T> instead.
You may also have to use Self::query_self directly.
Sourcepub fn resource<T>(&self) -> T
pub fn resource<T>(&self) -> T
Get a resource from the ECS. This will clone the resource and return it.
Sourcepub fn map_resource<T, R>(&self, f: impl FnOnce(&T) -> R) -> Rwhere
T: Resource,
pub fn map_resource<T, R>(&self, f: impl FnOnce(&T) -> R) -> Rwhere
T: Resource,
Get a required ECS resource and call the given function with it.
Sourcepub fn map_get_resource<T, R>(&self, f: impl FnOnce(Option<&T>) -> R) -> Rwhere
T: Resource,
pub fn map_get_resource<T, R>(&self, f: impl FnOnce(Option<&T>) -> R) -> Rwhere
T: Resource,
Get an optional ECS resource and call the given function with it.
Sourcepub fn world(&self) -> Arc<RwLock<RawRwLock, Instance>>
pub fn world(&self) -> Arc<RwLock<RawRwLock, Instance>>
Get an RwLock with a reference to our (potentially shared) world.
This gets the Instance from the client’s InstanceHolder
component. If it’s a normal client, then it’ll be the same as the
world the client has loaded. If the client is using a shared world,
then the shared world will be a superset of the client’s world.
Sourcepub fn partial_world(&self) -> Arc<RwLock<RawRwLock, PartialInstance>>
pub fn partial_world(&self) -> Arc<RwLock<RawRwLock, PartialInstance>>
Get an RwLock with a reference to the world that this client has
loaded.
let world = client.partial_world();
let is_0_0_loaded = world.read().chunks.limited_get(&ChunkPos::new(0, 0)).is_some();Source§impl Client
impl Client
Sourcepub fn position(&self) -> Vec3
pub fn position(&self) -> Vec3
Get the position of this client.
This is a shortcut for Vec3::from(&bot.component::<Position>()).
Note that this value is given a default of Vec3::ZERO when it
receives the login packet, its true position may be set ticks
later.
Sourcepub fn dimensions(&self) -> EntityDimensions
pub fn dimensions(&self) -> EntityDimensions
Get the bounding box dimensions for our client, which contains our width, height, and eye height.
This is a shortcut for
self.component::<EntityDimensions>().
Sourcepub fn eye_position(&self) -> Vec3
pub fn eye_position(&self) -> Vec3
Get the position of this client’s eyes.
This is a shortcut for
bot.position().up(bot.dimensions().eye_height).
Sourcepub fn health(&self) -> f32
pub fn health(&self) -> f32
Get the health of this client.
This is a shortcut for *bot.component::<Health>().
Sourcepub fn hunger(&self) -> Hunger
pub fn hunger(&self) -> Hunger
Get the hunger level of this client, which includes both food and saturation.
This is a shortcut for self.component::<Hunger>().to_owned().
Sourcepub fn username(&self) -> String
pub fn username(&self) -> String
Get the username of this client.
This is a shortcut for
bot.component::<GameProfileComponent>().name.to_owned().
Sourcepub fn uuid(&self) -> Uuid
pub fn uuid(&self) -> Uuid
Get the Minecraft UUID of this client.
This is a shortcut for bot.component::<GameProfileComponent>().uuid.
Sourcepub fn tab_list(&self) -> HashMap<Uuid, PlayerInfo>
pub fn tab_list(&self) -> HashMap<Uuid, PlayerInfo>
Get a map of player UUIDs to their information in the tab list.
This is a shortcut for *bot.component::<TabList>().
Sourcepub fn profile(&self) -> GameProfile
pub fn profile(&self) -> GameProfile
Returns the GameProfile for our client. This contains your username,
UUID, and skin data.
These values are set by the server upon login, which means they might
not match up with your actual game profile. Also, note that the username
and skin that gets displayed in-game will actually be the ones from
the tab list, which you can get from Self::tab_list.
This as also available from the ECS as GameProfileComponent.
Sourcepub fn player_uuid_by_username(&self, username: &str) -> Option<Uuid>
pub fn player_uuid_by_username(&self, username: &str) -> Option<Uuid>
A convenience function to get the Minecraft Uuid of a player by their username, if they’re present in the tab list.
You can chain this with Client::entity_by_uuid to get the ECS
Entity for the player.
Sourcepub fn entity_by_uuid(&self, uuid: Uuid) -> Option<Entity>
pub fn entity_by_uuid(&self, uuid: Uuid) -> Option<Entity>
Get an ECS Entity in the world by its Minecraft UUID, if it’s within
render distance.
Sourcepub fn minecraft_entity_by_ecs_entity(
&self,
entity: Entity,
) -> Option<MinecraftEntityId>
pub fn minecraft_entity_by_ecs_entity( &self, entity: Entity, ) -> Option<MinecraftEntityId>
Convert an ECS Entity to a MinecraftEntityId.
Sourcepub fn ecs_entity_by_minecraft_entity(
&self,
entity: MinecraftEntityId,
) -> Option<Entity>
pub fn ecs_entity_by_minecraft_entity( &self, entity: MinecraftEntityId, ) -> Option<Entity>
Convert a MinecraftEntityId to an ECS Entity.
Sourcepub fn with_registry_holder<R>(&self, f: impl FnOnce(&RegistryHolder) -> R) -> R
pub fn with_registry_holder<R>(&self, f: impl FnOnce(&RegistryHolder) -> R) -> R
Call the given function with the client’s RegistryHolder.
The player’s instance (aka world) will be locked during this time, which may result in a deadlock if you try to access the instance again while in the function.
Sourcepub fn resolve_registry_name(
&self,
registry: &impl ResolvableDataRegistry,
) -> Option<ResourceLocation>
pub fn resolve_registry_name( &self, registry: &impl ResolvableDataRegistry, ) -> Option<ResourceLocation>
Resolve the given registry to its name.
This is necessary for data-driven registries like Enchantment.
Sourcepub fn with_resolved_registry<R>(
&self,
registry: impl ResolvableDataRegistry,
f: impl FnOnce(&ResourceLocation, &NbtCompound) -> R,
) -> Option<R>
pub fn with_resolved_registry<R>( &self, registry: impl ResolvableDataRegistry, f: impl FnOnce(&ResourceLocation, &NbtCompound) -> R, ) -> Option<R>
Resolve the given registry to its name and data and call the given function with it.
This is necessary for data-driven registries like Enchantment.
If you just want the value name, use Self::resolve_registry_name
instead.
Source§impl Client
impl Client
Sourcepub fn query_self<D, R>(
&self,
f: impl FnOnce(<D as QueryData>::Item<'_, '_>) -> R,
) -> Rwhere
D: QueryData,
pub fn query_self<D, R>(
&self,
f: impl FnOnce(<D as QueryData>::Item<'_, '_>) -> R,
) -> Rwhere
D: QueryData,
A convenience function for getting components from our client’s entity.
To query another entity, you can use Self::query_entity.
§Examples
let is_logged_in = client.query_self::<Option<&InstanceName>, _>(|ins| ins.is_some());§Panics
This will panic if the component doesn’t exist on the client.
Sourcepub fn query_entity<D, R>(
&self,
entity: Entity,
f: impl FnOnce(<D as QueryData>::Item<'_, '_>) -> R,
) -> Rwhere
D: QueryData,
pub fn query_entity<D, R>(
&self,
entity: Entity,
f: impl FnOnce(<D as QueryData>::Item<'_, '_>) -> R,
) -> Rwhere
D: QueryData,
A convenience function for getting components from any entity.
If you’re querying the client, you should use Self::query_self.
§Panics
This will panic if the entity doesn’t exist or if the query isn’t valid
for the entity. For a non-panicking version, you may use
Self::try_query_entity.
Sourcepub fn try_query_entity<D, R>(
&self,
entity: Entity,
f: impl FnOnce(<D as QueryData>::Item<'_, '_>) -> R,
) -> Result<R, QueryEntityError>where
D: QueryData,
pub fn try_query_entity<D, R>(
&self,
entity: Entity,
f: impl FnOnce(<D as QueryData>::Item<'_, '_>) -> R,
) -> Result<R, QueryEntityError>where
D: QueryData,
A convenience function for getting components from any entity, or None if the query fails.
If you’re sure that the entity exists and that the query will succeed,
you can use Self::query_entity.
Sourcepub fn any_entity_by<Q, F>(
&self,
predicate: impl EntityPredicate<Q, F>,
) -> Option<Entity>where
Q: QueryData,
F: QueryFilter,
pub fn any_entity_by<Q, F>(
&self,
predicate: impl EntityPredicate<Q, F>,
) -> Option<Entity>where
Q: QueryData,
F: QueryFilter,
Quickly returns a lightweight Entity for an arbitrary entity that
matches the given predicate function that is in the same
Instance as the client.
You can then use Self::entity_component to get components from this
entity.
If you want to find the nearest entity, consider using
Self::nearest_entity_by instead. If you want to find all entities
that match the predicate, use Self::nearest_entities_by.
§Example
use azalea_client::{Client, player::GameProfileComponent};
use azalea_entity::{Position, metadata::Player};
use bevy_ecs::query::With;
let entity = bot.any_entity_by::<&GameProfileComponent, With<Player>>(
|profile: &GameProfileComponent| profile.name == sender_name,
);
if let Some(entity) = entity {
let position = bot.entity_component::<Position>(entity);
// ...
}Sourcepub fn nearest_entity_by<Q, F>(
&self,
predicate: impl EntityPredicate<Q, F>,
) -> Option<Entity>where
Q: QueryData,
F: QueryFilter,
pub fn nearest_entity_by<Q, F>(
&self,
predicate: impl EntityPredicate<Q, F>,
) -> Option<Entity>where
Q: QueryData,
F: QueryFilter,
Return a lightweight Entity for the nearest entity that matches the
given predicate function.
You can then use Self::entity_component to get components from this
entity.
If you don’t need the entity to be the nearest one, it may be more
efficient to use Self::any_entity_by instead. You can also use
Self::nearest_entities_by to get all nearby entities.
use azalea_entity::{LocalEntity, Position, metadata::Player};
use bevy_ecs::query::{With, Without};
// get the position of the nearest player
if let Some(nearest_player) =
bot.nearest_entity_by::<(), (With<Player>, Without<LocalEntity>)>(|_: ()| true)
{
let nearest_player_pos = *bot.entity_component::<Position>(nearest_player);
bot.chat(format!("You are at {nearest_player_pos}"));
}Sourcepub fn nearest_entities_by<Q, F>(
&self,
predicate: impl EntityPredicate<Q, F>,
) -> Vec<Entity>where
Q: QueryData,
F: QueryFilter,
pub fn nearest_entities_by<Q, F>(
&self,
predicate: impl EntityPredicate<Q, F>,
) -> Vec<Entity>where
Q: QueryData,
F: QueryFilter,
Similar to Self::nearest_entity_by but returns a Vec<Entity> of
all entities in our instance that match the predicate.
The first entity is the nearest one.
let nearby_players =
bot.nearest_entities_by::<(), (With<Player>, Without<LocalEntity>)>(|_: ()| true);Sourcepub fn entity_component<Q>(&self, entity: Entity) -> Q
pub fn entity_component<Q>(&self, entity: Entity) -> Q
Get a component from an entity.
Note that this will return an owned type (i.e. not a reference) so it may be expensive for larger types.
If you’re trying to get a component for this client, use
Self::component.
Sourcepub fn get_entity_component<Q>(&self, entity: Entity) -> Option<Q>
pub fn get_entity_component<Q>(&self, entity: Entity) -> Option<Q>
Get a component from an entity, if it exists.
This is similar to Self::entity_component but returns an Option
instead of panicking if the component isn’t present.
Source§impl Client
impl Client
Sourcepub fn attack(&self, entity: Entity)
pub fn attack(&self, entity: Entity)
Attack an entity in the world.
This doesn’t automatically look at the entity or perform any range/visibility checks, so it might trigger anticheats.
Sourcepub fn has_attack_cooldown(&self) -> bool
pub fn has_attack_cooldown(&self) -> bool
Whether the player has an attack cooldown.
Also see Client::attack_cooldown_remaining_ticks.
Sourcepub fn attack_cooldown_remaining_ticks(&self) -> usize
pub fn attack_cooldown_remaining_ticks(&self) -> usize
Returns the number of ticks until we can attack at full strength again.
Also see Client::has_attack_cooldown.
Source§impl Client
impl Client
Sourcepub fn write_chat_packet(&self, message: &str)
pub fn write_chat_packet(&self, message: &str)
Send a chat message to the server.
This only sends the chat packet and not the command packet, which means
on some servers you can use this to send chat messages that start
with a /. The Client::chat function handles checking whether
the message is a command and using the proper packet for you, so you
should use that instead.
Sourcepub fn write_command_packet(&self, command: &str)
pub fn write_command_packet(&self, command: &str)
Send a command packet to the server. The command argument should not
include the slash at the front.
You can also just use Client::chat and start your message with a /
to send a command.
Source§impl Client
impl Client
Sourcepub fn set_client_information(&self, client_information: ClientInformation)
pub fn set_client_information(&self, client_information: ClientInformation)
Tell the server we changed our game options (i.e. render distance, main hand).
If this is not set before the login packet, the default will be sent.
bot.set_client_information(ClientInformation {
view_distance: 2,
..Default::default()
});Source§impl Client
impl Client
Sourcepub fn block_interact(&self, position: BlockPos)
pub fn block_interact(&self, position: BlockPos)
Right-click a block.
The behavior of this depends on the target block, and it’ll either place the block you’re holding in your hand or use the block you clicked (like toggling a lever).
Note that this may trigger anticheats as it doesn’t take into account whether you’re actually looking at the block.
Sourcepub fn entity_interact(&self, entity: Entity)
pub fn entity_interact(&self, entity: Entity)
Right-click an entity.
This can click through walls, which may trigger anticheats. If that
behavior isn’t desired, consider using Client::start_use_item
instead.
Sourcepub fn start_use_item(&self)
pub fn start_use_item(&self)
Right-click the currently held item.
If the item is consumable, then it’ll act as if right-click was held until the item finishes being consumed. You can use this to eat food.
If we’re looking at a block or entity, then it will be clicked. Also see
Client::block_interact and Client::entity_interact.
Source§impl Client
impl Client
Return the menu that is currently open, or the player’s inventory if no menu is open.
Sourcepub fn selected_hotbar_slot(&self) -> u8
pub fn selected_hotbar_slot(&self) -> u8
Returns the index of the hotbar slot that’s currently selected.
If you want to access the actual held item, you can get the current menu
with Client::menu and then get the slot index by offsetting from
the start of azalea_inventory::Menu::hotbar_slots_range.
You can use Self::set_selected_hotbar_slot to change it.
Sourcepub fn set_selected_hotbar_slot(&self, new_hotbar_slot_index: u8)
pub fn set_selected_hotbar_slot(&self, new_hotbar_slot_index: u8)
Update the selected hotbar slot index.
This will run next Update, so you might want to call
bot.wait_updates(1) after calling this if you’re using azalea.
§Panics
This will panic if new_hotbar_slot_index is not in the range 0..=8.
Source§impl Client
impl Client
pub fn start_mining(&self, position: BlockPos)
Sourcepub fn left_click_mine(&self, enabled: bool)
pub fn left_click_mine(&self, enabled: bool)
When enabled, the bot will mine any block that it is looking at if it is reachable.
Source§impl Client
impl Client
Sourcepub fn set_jumping(&self, jumping: bool)
pub fn set_jumping(&self, jumping: bool)
Set whether we’re jumping. This acts as if you held space in vanilla.
If you want to jump once, use the jump function in azalea.
If you’re making a realistic client, calling this function every tick is recommended.
pub fn set_crouching(&self, crouching: bool)
Sourcepub fn crouching(&self) -> bool
pub fn crouching(&self) -> bool
Whether the client is currently trying to sneak.
You may want to check the Pose instead.
Sourcepub fn set_direction(&self, y_rot: f32, x_rot: f32)
pub fn set_direction(&self, y_rot: f32, x_rot: f32)
Sets the direction the client is looking.
y_rot is yaw (looking to the side, between -180 to 180), and x_rot
is pitch (looking up and down, between -90 to 90).
You can get these numbers from the vanilla f3 screen.
Sourcepub fn direction(&self) -> (f32, f32)
pub fn direction(&self) -> (f32, f32)
Returns the direction the client is looking.
See Self::set_direction for more details.
Source§impl Client
impl Client
Sourcepub fn walk(&self, direction: WalkDirection)
pub fn walk(&self, direction: WalkDirection)
Start walking in the given direction.
To sprint, use Client::sprint. To stop walking, call walk with
WalkDirection::None.
§Example
// walk for one second
bot.walk(WalkDirection::Forward);
tokio::time::sleep(Duration::from_secs(1)).await;
bot.walk(WalkDirection::None);Sourcepub fn sprint(&self, direction: SprintDirection)
pub fn sprint(&self, direction: SprintDirection)
Start sprinting in the given direction.
o stop moving, call bot.walk(WalkDirection::None)
§Example
// sprint for one second
bot.sprint(SprintDirection::Forward);
tokio::time::sleep(Duration::from_secs(1)).await;
bot.walk(WalkDirection::None);Trait Implementations§
Source§impl AutoToolClientExt for Client
impl AutoToolClientExt for Client
fn best_tool_in_hotbar_for_block(&self, block: BlockState) -> BestToolResult
async fn mine_with_auto_tool(&self, block_pos: BlockPos)
Source§impl BotClientExt for Client
impl BotClientExt for Client
Source§fn get_tick_broadcaster(&self) -> Receiver<()>
fn get_tick_broadcaster(&self) -> Receiver<()>
Returns a Receiver that receives a message every game tick.
This is useful if you want to efficiently loop until a certain condition is met.
let mut ticks = bot.get_tick_broadcaster();
while ticks.recv().await.is_ok() {
let ecs = bot.ecs.lock();
if ecs.get::<WaitingForInventoryOpen>(bot.entity).is_none() {
break;
}
}Source§fn get_update_broadcaster(&self) -> Receiver<()>
fn get_update_broadcaster(&self) -> Receiver<()>
Returns a Receiver that receives a message every ECS Update.
ECS Updates happen at least at the frequency of game ticks, usually faster.
This is useful if you’re sending an ECS event and want to make sure it’s been handled before continuing.
Source§async fn wait_ticks(&self, n: usize)
async fn wait_ticks(&self, n: usize)
Wait for the specified number of ticks using
Self::get_tick_broadcaster.
If you’re going to run this in a loop, you may want to use that function
instead and use the Receiver from it to avoid accidentally skipping
ticks and having to wait longer.
Source§async fn wait_updates(&self, n: usize)
async fn wait_updates(&self, n: usize)
Waits for the specified number of ECS Updates using
Self::get_update_broadcaster.
These are basically equivalent to frames because even though we have no rendering, some game mechanics depend on frames.
If you’re going to run this in a loop, you may want to use that function
instead and use the Receiver from it to avoid accidentally skipping
ticks and having to wait longer.
Source§impl ContainerClientExt for Client
impl ContainerClientExt for Client
Source§async fn open_container_at(
&self,
pos: BlockPos,
timeout_ticks: Option<usize>,
) -> Option<ContainerHandle>
async fn open_container_at( &self, pos: BlockPos, timeout_ticks: Option<usize>, ) -> Option<ContainerHandle>
Source§async fn wait_for_container_open(
&self,
timeout_ticks: Option<usize>,
) -> Option<ContainerHandle>
async fn wait_for_container_open( &self, timeout_ticks: Option<usize>, ) -> Option<ContainerHandle>
Source§fn open_inventory(&self) -> Option<ContainerHandle>
fn open_inventory(&self) -> Option<ContainerHandle>
Source§fn get_inventory(&self) -> ContainerHandleRef
fn get_inventory(&self) -> ContainerHandleRef
ContainerHandleRef to the client’s currently open
container, or their inventory. Read moreSource§fn get_held_item(&self) -> ItemStack
fn get_held_item(&self) -> ItemStack
Source§impl PathfinderClientExt for Client
impl PathfinderClientExt for Client
Source§async fn goto(&self, goal: impl Goal + 'static)
async fn goto(&self, goal: impl Goal + 'static)
Source§async fn goto_with_opts(&self, goal: impl Goal + 'static, opts: PathfinderOpts)
async fn goto_with_opts(&self, goal: impl Goal + 'static, opts: PathfinderOpts)
Self::goto, but allows you to set custom options for
pathfinding, including disabling mining and setting custom moves. Read moreSource§fn start_goto(&self, goal: impl Goal + 'static)
fn start_goto(&self, goal: impl Goal + 'static)
Source§fn start_goto_with_opts(&self, goal: impl Goal + 'static, opts: PathfinderOpts)
fn start_goto_with_opts(&self, goal: impl Goal + 'static, opts: PathfinderOpts)
Self::start_goto, but allows you to set custom
options for pathfinding, including disabling mining and setting custom
moves. Read moreSource§fn stop_pathfinding(&self)
fn stop_pathfinding(&self)
Source§fn force_stop_pathfinding(&self)
fn force_stop_pathfinding(&self)
Source§async fn wait_until_goto_target_reached(&self)
async fn wait_until_goto_target_reached(&self)
Source§fn is_goto_target_reached(&self) -> bool
fn is_goto_target_reached(&self) -> bool
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§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.§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.