Server

Struct Server 

Source
pub struct Server {
    pub plugin_id: String,
    pub sender: Sender<PluginToHost>,
}

Fields§

§plugin_id: String§sender: Sender<PluginToHost>

Implementations§

Source§

impl Server

Source

pub async fn send_chat( &self, target_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>

Sends a SendChat action to the server.

Source

pub async fn teleport( &self, player_uuid: String, position: impl Into<Option<Vec3>>, rotation: impl Into<Option<Vec3>>, ) -> Result<(), SendError<PluginToHost>>

Sends a Teleport action to the server.

Source

pub async fn kick( &self, player_uuid: String, reason: String, ) -> Result<(), SendError<PluginToHost>>

Sends a Kick action to the server.

Source

pub async fn set_game_mode( &self, player_uuid: String, game_mode: GameMode, ) -> Result<(), SendError<PluginToHost>>

Sends a SetGameMode action to the server.

Source

pub async fn give_item( &self, player_uuid: String, item: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>

Sends a GiveItem action to the server.

Source

pub async fn clear_inventory( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a ClearInventory action to the server.

Source

pub async fn set_held_item( &self, player_uuid: String, main: impl Into<Option<ItemStack>>, offhand: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>

Sends a SetHeldItem action to the server.

Source

pub async fn player_set_armour( &self, player_uuid: String, helmet: impl Into<Option<ItemStack>>, chestplate: impl Into<Option<ItemStack>>, leggings: impl Into<Option<ItemStack>>, boots: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetArmour action to the server.

Source

pub async fn player_open_block_container( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerOpenBlockContainer action to the server.

Source

pub async fn player_drop_item( &self, player_uuid: String, item: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerDropItem action to the server.

Source

pub async fn player_set_item_cooldown( &self, player_uuid: String, item: impl Into<Option<ItemStack>>, duration_ms: i64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetItemCooldown action to the server.

Source

pub async fn set_health( &self, player_uuid: String, health: f64, max_health: impl Into<Option<f64>>, ) -> Result<(), SendError<PluginToHost>>

Sends a SetHealth action to the server.

Source

pub async fn set_food( &self, player_uuid: String, food: i32, ) -> Result<(), SendError<PluginToHost>>

Sends a SetFood action to the server.

Source

pub async fn set_experience( &self, player_uuid: String, level: impl Into<Option<i32>>, progress: impl Into<Option<f32>>, amount: impl Into<Option<i32>>, ) -> Result<(), SendError<PluginToHost>>

Sends a SetExperience action to the server.

Source

pub async fn set_velocity( &self, player_uuid: String, velocity: impl Into<Option<Vec3>>, ) -> Result<(), SendError<PluginToHost>>

Sends a SetVelocity action to the server.

Source

pub async fn add_effect( &self, player_uuid: String, effect_type: EffectType, level: i32, duration_ms: i64, show_particles: bool, ) -> Result<(), SendError<PluginToHost>>

Sends a AddEffect action to the server.

Source

pub async fn remove_effect( &self, player_uuid: String, effect_type: EffectType, ) -> Result<(), SendError<PluginToHost>>

Sends a RemoveEffect action to the server.

Source

pub async fn send_title( &self, player_uuid: String, title: String, subtitle: impl Into<Option<String>>, fade_in_ms: impl Into<Option<i64>>, duration_ms: impl Into<Option<i64>>, fade_out_ms: impl Into<Option<i64>>, ) -> Result<(), SendError<PluginToHost>>

Sends a SendTitle action to the server.

Source

pub async fn send_popup( &self, player_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>

Sends a SendPopup action to the server.

Source

pub async fn send_tip( &self, player_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>

Sends a SendTip action to the server.

Source

pub async fn player_send_toast( &self, player_uuid: String, title: String, message: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendToast action to the server.

Source

pub async fn player_send_jukebox_popup( &self, player_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendJukeboxPopup action to the server.

Source

pub async fn player_show_coordinates( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerShowCoordinates action to the server.

Source

pub async fn player_hide_coordinates( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerHideCoordinates action to the server.

Source

pub async fn player_enable_instant_respawn( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerEnableInstantRespawn action to the server.

Source

pub async fn player_disable_instant_respawn( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerDisableInstantRespawn action to the server.

Source

pub async fn player_set_name_tag( &self, player_uuid: String, name_tag: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetNameTag action to the server.

Source

pub async fn player_set_score_tag( &self, player_uuid: String, score_tag: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetScoreTag action to the server.

Source

pub async fn play_sound( &self, player_uuid: String, sound: Sound, position: impl Into<Option<Vec3>>, volume: impl Into<Option<f32>>, pitch: impl Into<Option<f32>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlaySound action to the server.

Source

pub async fn player_show_particle( &self, player_uuid: String, position: impl Into<Option<Vec3>>, particle: ParticleType, block: impl Into<Option<BlockState>>, face: impl Into<Option<i32>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerShowParticle action to the server.

Source

pub async fn player_send_scoreboard( &self, player_uuid: String, title: String, lines: Vec<String>, padding: impl Into<Option<bool>>, descending: impl Into<Option<bool>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendScoreboard action to the server.

Source

pub async fn player_remove_scoreboard( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerRemoveScoreboard action to the server.

Source

pub async fn player_send_menu_form( &self, player_uuid: String, title: String, body: impl Into<Option<String>>, buttons: Vec<String>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendMenuForm action to the server.

Source

pub async fn player_send_modal_form( &self, player_uuid: String, title: String, body: String, yes_text: String, no_text: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendModalForm action to the server.

Source

pub async fn player_send_dialogue( &self, player_uuid: String, title: String, body: impl Into<Option<String>>, buttons: Vec<String>, entity: impl Into<Option<EntityRef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendDialogue action to the server.

Source

pub async fn player_close_dialogue( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerCloseDialogue action to the server.

Source

pub async fn player_close_form( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerCloseForm action to the server.

Source

pub async fn execute_command( &self, player_uuid: String, command: String, ) -> Result<(), SendError<PluginToHost>>

Sends a ExecuteCommand action to the server.

Source

pub async fn player_start_sprinting( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStartSprinting action to the server.

Source

pub async fn player_stop_sprinting( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStopSprinting action to the server.

Source

pub async fn player_start_sneaking( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStartSneaking action to the server.

Source

pub async fn player_stop_sneaking( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStopSneaking action to the server.

Source

pub async fn player_start_swimming( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStartSwimming action to the server.

Source

pub async fn player_stop_swimming( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStopSwimming action to the server.

Source

pub async fn player_start_crawling( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStartCrawling action to the server.

Source

pub async fn player_stop_crawling( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStopCrawling action to the server.

Source

pub async fn player_start_gliding( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStartGliding action to the server.

Source

pub async fn player_stop_gliding( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStopGliding action to the server.

Source

pub async fn player_start_flying( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStartFlying action to the server.

Source

pub async fn player_stop_flying( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerStopFlying action to the server.

Source

pub async fn player_set_immobile( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetImmobile action to the server.

Source

pub async fn player_set_mobile( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetMobile action to the server.

Source

pub async fn player_set_speed( &self, player_uuid: String, speed: f64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetSpeed action to the server.

Source

pub async fn player_set_flight_speed( &self, player_uuid: String, flight_speed: f64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetFlightSpeed action to the server.

Source

pub async fn player_set_vertical_flight_speed( &self, player_uuid: String, vertical_flight_speed: f64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetVerticalFlightSpeed action to the server.

Source

pub async fn player_set_absorption( &self, player_uuid: String, absorption: f64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetAbsorption action to the server.

Source

pub async fn player_set_on_fire( &self, player_uuid: String, duration_ms: i64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetOnFire action to the server.

Source

pub async fn player_extinguish( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerExtinguish action to the server.

Source

pub async fn player_set_invisible( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetInvisible action to the server.

Source

pub async fn player_set_visible( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetVisible action to the server.

Source

pub async fn player_set_scale( &self, player_uuid: String, scale: f64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetScale action to the server.

Source

pub async fn player_set_held_slot( &self, player_uuid: String, slot: i32, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSetHeldSlot action to the server.

Source

pub async fn player_respawn( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerRespawn action to the server.

Source

pub async fn player_transfer( &self, player_uuid: String, address: impl Into<Option<Address>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerTransfer action to the server.

Source

pub async fn player_knock_back( &self, player_uuid: String, source: impl Into<Option<Vec3>>, force: f64, height: f64, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerKnockBack action to the server.

Source

pub async fn player_swing_arm( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSwingArm action to the server.

Source

pub async fn player_punch_air( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerPunchAir action to the server.

Source

pub async fn player_send_boss_bar( &self, player_uuid: String, text: String, health_percentage: impl Into<Option<f32>>, colour: impl Into<Option<BossBarColour>>, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerSendBossBar action to the server.

Source

pub async fn player_remove_boss_bar( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerRemoveBossBar action to the server.

Source

pub async fn player_show_hud_element( &self, player_uuid: String, element: HudElement, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerShowHudElement action to the server.

Source

pub async fn player_hide_hud_element( &self, player_uuid: String, element: HudElement, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerHideHudElement action to the server.

Source

pub async fn player_open_sign( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, front_side: bool, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerOpenSign action to the server.

Source

pub async fn player_edit_sign( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, front_text: String, back_text: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerEditSign action to the server.

Source

pub async fn player_turn_lectern_page( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, page: i32, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerTurnLecternPage action to the server.

Source

pub async fn player_hide_player( &self, player_uuid: String, target_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerHidePlayer action to the server.

Source

pub async fn player_show_player( &self, player_uuid: String, target_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerShowPlayer action to the server.

Source

pub async fn player_remove_all_debug_shapes( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a PlayerRemoveAllDebugShapes action to the server.

Source

pub async fn world_set_default_game_mode( &self, world: impl Into<Option<WorldRef>>, game_mode: GameMode, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetDefaultGameMode action to the server.

Source

pub async fn world_set_difficulty( &self, world: impl Into<Option<WorldRef>>, difficulty: Difficulty, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetDifficulty action to the server.

Source

pub async fn world_set_tick_range( &self, world: impl Into<Option<WorldRef>>, tick_range: i32, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetTickRange action to the server.

Source

pub async fn world_set_block( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, block: impl Into<Option<BlockState>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetBlock action to the server.

Source

pub async fn world_play_sound( &self, world: impl Into<Option<WorldRef>>, sound: Sound, position: impl Into<Option<Vec3>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldPlaySound action to the server.

Source

pub async fn world_add_particle( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<Vec3>>, particle: ParticleType, block: impl Into<Option<BlockState>>, face: impl Into<Option<i32>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldAddParticle action to the server.

Source

pub async fn world_set_time( &self, world: impl Into<Option<WorldRef>>, time: i32, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetTime action to the server.

Source

pub async fn world_stop_time( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldStopTime action to the server.

Source

pub async fn world_start_time( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldStartTime action to the server.

Source

pub async fn world_set_spawn( &self, world: impl Into<Option<WorldRef>>, spawn: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetSpawn action to the server.

Source

pub async fn world_set_biome( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, biome_id: String, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetBiome action to the server.

Source

pub async fn world_set_liquid( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, liquid: impl Into<Option<LiquidState>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldSetLiquid action to the server.

Source

pub async fn world_schedule_block_update( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, block: impl Into<Option<BlockState>>, delay_ms: i64, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldScheduleBlockUpdate action to the server.

Source

pub async fn world_build_structure( &self, world: impl Into<Option<WorldRef>>, origin: impl Into<Option<BlockPos>>, structure: impl Into<Option<StructureDef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldBuildStructure action to the server.

Source

pub async fn world_query_entities( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryEntities action to the server.

Source

pub async fn world_query_players( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryPlayers action to the server.

Source

pub async fn world_query_entities_within( &self, world: impl Into<Option<WorldRef>>, box: impl Into<Option<BBox>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryEntitiesWithin action to the server.

Source

pub async fn world_query_player_spawn( &self, world: impl Into<Option<WorldRef>>, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryPlayerSpawn action to the server.

Source

pub async fn world_query_block( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryBlock action to the server.

Source

pub async fn world_query_biome( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryBiome action to the server.

Source

pub async fn world_query_light( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryLight action to the server.

Source

pub async fn world_query_sky_light( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQuerySkyLight action to the server.

Source

pub async fn world_query_temperature( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryTemperature action to the server.

Source

pub async fn world_query_highest_block( &self, world: impl Into<Option<WorldRef>>, x: i32, z: i32, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryHighestBlock action to the server.

Source

pub async fn world_query_raining_at( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryRainingAt action to the server.

Source

pub async fn world_query_snowing_at( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQuerySnowingAt action to the server.

Source

pub async fn world_query_thundering_at( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryThunderingAt action to the server.

Source

pub async fn world_query_liquid( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryLiquid action to the server.

Source

pub async fn world_query_default_game_mode( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>

Sends a WorldQueryDefaultGameMode action to the server.

Source§

impl Server

Source

pub async fn send_action( &self, kind: Kind, ) -> Result<(), SendError<PluginToHost>>

Helper to build and send a single action.

Source

pub async fn send_actions( &self, actions: Vec<Action>, ) -> Result<(), SendError<PluginToHost>>

Helper to send a batch of actions.

Source

pub async fn subscribe( &self, events: Vec<EventType>, ) -> Result<(), SendError<PluginToHost>>

Subscribe to a list of game events.

Trait Implementations§

Source§

impl Clone for Server

Source§

fn clone(&self) -> Server

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Server

§

impl RefUnwindSafe for Server

§

impl Send for Server

§

impl Sync for Server

§

impl Unpin for Server

§

impl UnwindSafe for Server

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more