pub struct FakeSteamBackend { /* private fields */ }Expand description
An in-memory Steam. Cheap to clone: every clone shares the same state, so a test keeps one
clone to inspect while the kit owns another inside crate::SteamBackendRes.
Defaults: local id 76561197960265729, app id 480; with feature lobby, create_lobby
completes on the next pump with ids 1000, 1001, ... and join_lobby succeeds on the next
pump; with feature stats, stats are ready, no stat or achievement is defined, and a store
succeeds on the next pump; with auth, a ticket arrives on the next pump; with friends, no
friends; with overlay, the overlay is enabled. Each feature’s knobs are listed with its
methods.
Implementations§
Source§impl FakeSteamBackend
Auth controls (feature auth).
impl FakeSteamBackend
Auth controls (feature auth).
Sourcepub fn fake_web_api_ticket(op: u64) -> Vec<u8> ⓘ
Available on crate feature auth only.
pub fn fake_web_api_ticket(op: u64) -> Vec<u8> ⓘ
auth only.The bytes of the fake ticket for backend operation op: b"FAKE-TICKET-<op>". The kit
numbers its ticket requests 1, 2, 3, … in the order it sends them.
Sourcepub fn fail_next_auth_ticket(&self, failure: FakeAuthFailure)
Available on crate feature auth only.
pub fn fail_next_auth_ticket(&self, failure: FakeAuthFailure)
auth only.Make the next ticket request fail in the given way.
Sourcepub fn live_auth_tickets(&self) -> Vec<String>
Available on crate feature auth only.
pub fn live_auth_tickets(&self) -> Vec<String>
auth only.The identities of every ticket requested and not cancelled (pending or delivered), in request order.
Source§impl FakeSteamBackend
impl FakeSteamBackend
Sourcepub fn pump_count(&self) -> u64
pub fn pump_count(&self) -> u64
How many times SteamBackend::pump has been called (the kit pumps exactly once per
frame while this backend is installed).
Sourcepub fn set_local_id(&self, id: u64)
pub fn set_local_id(&self, id: u64)
Set the local user’s SteamID64.
Sourcepub fn push_event(&self, event: BackendEvent)
pub fn push_event(&self, event: BackendEvent)
Queue any raw backend event (e.g. a join request) for the next pump.
Sourcepub fn set_friend_name(&self, id: u64, name: &str)
pub fn set_friend_name(&self, id: u64, name: &str)
Give a user a persona name.
With feature friends this also queues the PersonaChanged (name) event Steam sends.
Sourcepub fn set_launch_command_line(&self, text: &str)
pub fn set_launch_command_line(&self, text: &str)
Set what launch_command_line returns.
Sourcepub fn simulate_steam_exit(&self)
pub fn simulate_steam_exit(&self)
Queue what the real backend reports when the Steam client exits while the game runs
(BackendEvent::SteamLost with crate::SteamLostReason::SteamExited) for the next
pump: the kit then makes the backend inert (never pumped again) and writes
crate::SteamLost.
Sourcepub fn simulate_steam_shutdown(&self)
pub fn simulate_steam_shutdown(&self)
What the real backend does when Steam sends its shutdown callback: from this call on the
backend supports no feature (every feature accessor is None, so the kit cannot reach any
feature call), the next pump drops what was queued and returns
BackendEvent::SteamLost once, later pumps return nothing. calls
shows that nothing reaches the backend afterwards.
Sourcepub fn simulate_steam_process_ended(&self)
pub fn simulate_steam_process_ended(&self)
What the real backend does when the operating system reports the Steam client process gone
(killed or crashed, no shutdown callback): the same as simulate_steam_shutdown,
with crate::SteamLostReason::SteamProcessEnded.
Sourcepub fn panic_in_next_pump(&self)
pub fn panic_in_next_pump(&self)
The next pump PANICS (like a panic inside steamworks), to test that the kit catches it
(in a build that unwinds): that frame’s queued events are dropped and Steam is treated as
lost. Rust’s panic hook prints the panic message as usual.
Sourcepub fn set_app_id(&self, app_id: u32)
pub fn set_app_id(&self, app_id: u32)
Set the running app’s id (default 480), as the friends feature sees it.
Sourcepub fn push_rich_presence_join(&self, from: u64, connect: &str)
Available on crate features friends or lobby only.
pub fn push_rich_presence_join(&self, from: u64, connect: &str)
friends or lobby only.Queue what real Steam produces for a rich-presence “Join Game” or an accepted invite while
the game runs (GameRichPresenceJoinRequested): one event per compiled feature that reads
it (RichPresenceJoinRequested for lobby, ConnectRequested for friends), as the real
backend does.
Source§impl FakeSteamBackend
Friends controls (feature friends). Each change queues the PersonaChanged event real Steam
would send (delivered on the next pump).
impl FakeSteamBackend
Friends controls (feature friends). Each change queues the PersonaChanged event real Steam
would send (delivered on the next pump).
Sourcepub fn add_friend(&self, id: u64, state: PersonaState)
Available on crate feature friends only.
pub fn add_friend(&self, id: u64, state: PersonaState)
friends only.Add a friend with this state (name: set_friend_name).
Sourcepub fn remove_friend(&self, id: u64)
Available on crate feature friends only.
pub fn remove_friend(&self, id: u64)
friends only.Remove a friend.
Sourcepub fn set_friend_state(&self, id: u64, state: PersonaState)
Available on crate feature friends only.
pub fn set_friend_state(&self, id: u64, state: PersonaState)
friends only.Change a friend’s online status.
Sourcepub fn set_friend_game(&self, id: u64, game: Option<(u32, u64)>)
Available on crate feature friends only.
pub fn set_friend_game(&self, id: u64, game: Option<(u32, u64)>)
friends only.Set (Some((app_id, lobby))) or clear the game a friend plays.
Sourcepub fn set_friend_rich_presence(&self, id: u64, key: &str, value: Option<&str>)
Available on crate feature friends only.
pub fn set_friend_rich_presence(&self, id: u64, key: &str, value: Option<&str>)
friends only.Set (Some) or remove (None) one rich-presence key of a friend. Like real Steam, this
sends NO event: the kit sees it on its next refresh.
Sourcepub fn set_friend_nickname(&self, id: u64, nickname: Option<&str>)
Available on crate feature friends only.
pub fn set_friend_nickname(&self, id: u64, nickname: Option<&str>)
friends only.Set (Some) or clear the nickname the local user gave a friend.
Sourcepub fn set_local_persona(&self, name: &str, state: PersonaState)
Available on crate feature friends only.
pub fn set_local_persona(&self, name: &str, state: PersonaState)
friends only.Set the local user’s own persona name and state.
Sourcepub fn set_friend_avatar(&self, id: u64, width: u32, height: u32, rgba: Vec<u8>)
Available on crate feature friends only.
pub fn set_friend_avatar(&self, id: u64, width: u32, height: u32, rgba: Vec<u8>)
friends only.Give a user an avatar (returned for every size; rgba should be width * height * 4
bytes).
Sourcepub fn set_friend_avatar_loading(&self, id: u64, loading: bool)
Available on crate feature friends only.
pub fn set_friend_avatar_loading(&self, id: u64, loading: bool)
friends only.true: the user’s avatar is “loading” (None for every size, as Steam answers while it
loads a large one); false: available again, with a PersonaChanged like Steam.
Sourcepub fn set_user_info_loaded(&self, id: u64)
Available on crate feature friends only.
pub fn set_user_info_loaded(&self, id: u64)
friends only.Mark a user’s info as already loaded: request_user_information then returns false
(as it does for friends; otherwise it returns true and queues a PersonaChanged for the
user).
Sourcepub fn silence_next_user_info(&self)
Available on crate feature friends only.
pub fn silence_next_user_info(&self)
friends only.The next request_user_information is accepted, but Steam never delivers the persona.
Sourcepub fn refuse_next_game_invite(&self)
Available on crate feature friends only.
pub fn refuse_next_game_invite(&self)
friends only.The next game invite is refused by Steam (GameInviteSent { ok: false }).
Source§impl FakeSteamBackend
Leaderboard controls (feature leaderboards).
impl FakeSteamBackend
Leaderboard controls (feature leaderboards).
Sourcepub fn add_leaderboard(
&self,
name: &str,
sort: LeaderboardSort,
display: LeaderboardDisplay,
)
Available on crate feature leaderboards only.
pub fn add_leaderboard( &self, name: &str, sort: LeaderboardSort, display: LeaderboardDisplay, )
leaderboards only.Create a board, as the partner site would.
Sourcepub fn add_leaderboard_entry(
&self,
board: &str,
steam_id: u64,
score: i32,
details: &[i32],
)
Available on crate feature leaderboards only.
pub fn add_leaderboard_entry( &self, board: &str, steam_id: u64, score: i32, details: &[i32], )
leaderboards only.Put a player’s entry on a board (replacing theirs). Details beyond 64 are dropped.
Sourcepub fn set_friends(&self, friends: &[u64])
Available on crate feature leaderboards only.
pub fn set_friends(&self, friends: &[u64])
leaderboards only.The local player’s Steam friends (for ScoreRange::Friends).
Sourcepub fn fail_next_leaderboard_call(&self, failure: FakeLeaderboardFailure)
Available on crate feature leaderboards only.
pub fn fail_next_leaderboard_call(&self, failure: FakeLeaderboardFailure)
leaderboards only.Make the next leaderboard call fail in the given way.
Sourcepub fn leaderboard_entries(&self, board: &str) -> Vec<LeaderboardEntry>
Available on crate feature leaderboards only.
pub fn leaderboard_entries(&self, board: &str) -> Vec<LeaderboardEntry>
leaderboards only.A board’s entries, best first (empty for an unknown board).
Source§impl FakeSteamBackend
Lobby controls (feature lobby).
impl FakeSteamBackend
Lobby controls (feature lobby).
Sourcepub fn set_auto_complete_create(&self, auto: bool)
Available on crate feature lobby only.
pub fn set_auto_complete_create(&self, auto: bool)
lobby only.false: create_lobby stays pending until complete_create /
fail_create.
Sourcepub fn set_join_succeeds(&self, ok: bool)
Available on crate feature lobby only.
pub fn set_join_succeeds(&self, ok: bool)
lobby only.Make the following join_lobby calls fail (false) or succeed (true).
Sourcepub fn complete_create(&self, lobby: u64)
Available on crate feature lobby only.
pub fn complete_create(&self, lobby: u64)
lobby only.Complete a pending create with lobby (delivered on the next pump).
Sourcepub fn fail_create(&self, message: &str)
Available on crate feature lobby only.
pub fn fail_create(&self, message: &str)
lobby only.Fail a pending create (delivered on the next pump).
Sourcepub fn set_member_count(&self, lobby: u64, count: usize)
Available on crate feature lobby only.
pub fn set_member_count(&self, lobby: u64, count: usize)
lobby only.Set a lobby’s member count as seen by lobby_member_count.
Sourcepub fn put_lobby_data(&self, lobby: u64, key: &str, value: &str)
Available on crate feature lobby only.
pub fn put_lobby_data(&self, lobby: u64, key: &str, value: &str)
lobby only.Pre-set lobby metadata (as if another host had set it).
Sourcepub fn rich_presence(&self, key: &str) -> Option<String>
Available on crate feature lobby only.
pub fn rich_presence(&self, key: &str) -> Option<String>
lobby only.Current rich presence value for key.
Source§impl FakeSteamBackend
Overlay controls (feature overlay). Every request the kit passes on is recorded as
FakeCall::ActivateOverlay.
impl FakeSteamBackend
Overlay controls (feature overlay). Every request the kit passes on is recorded as
FakeCall::ActivateOverlay.
Sourcepub fn set_overlay_enabled(&self, enabled: bool)
Available on crate feature overlay only.
pub fn set_overlay_enabled(&self, enabled: bool)
overlay only.Whether Steam reports the overlay as available (default true).
Sourcepub fn toggle_overlay(&self, active: bool)
Available on crate feature overlay only.
pub fn toggle_overlay(&self, active: bool)
overlay only.Queue an “overlay opened” (true) or “closed” (false) event, as Steam sends when the
player presses Shift+Tab.
Sourcepub fn refuse_next_overlay(&self)
Available on crate feature overlay only.
pub fn refuse_next_overlay(&self)
overlay only.The backend refuses the next overlay call (OverlayErrorKind::Refused).
Source§impl FakeSteamBackend
Stats controls (feature stats).
impl FakeSteamBackend
Stats controls (feature stats).
Sourcepub fn define_stat(&self, name: &str, value: StatValue)
Available on crate feature stats only.
pub fn define_stat(&self, name: &str, value: StatValue)
stats only.Define a stat with its type (the variant) and starting value, as the partner site would.
Sourcepub fn define_achievement(&self, name: &str, unlocked: bool)
Available on crate feature stats only.
pub fn define_achievement(&self, name: &str, unlocked: bool)
stats only.Define an achievement, locked or already unlocked.
Sourcepub fn set_stats_ready(&self, ready: bool)
Available on crate feature stats only.
pub fn set_stats_ready(&self, ready: bool)
stats only.false: every stats call fails as if Steam had not loaded the stats (default true).
Sourcepub fn fail_next_store(&self, failure: FakeStoreFailure)
Available on crate feature stats only.
pub fn fail_next_store(&self, failure: FakeStoreFailure)
stats only.Make the next store_stats fail in the given way.
Trait Implementations§
Source§impl AuthBackend for FakeSteamBackend
Available on crate feature auth only.
impl AuthBackend for FakeSteamBackend
auth only.Source§fn request_web_api_ticket(&self, op: u64, identity: &str) -> bool
fn request_web_api_ticket(&self, op: u64, identity: &str) -> bool
identity (the name of the service that checks it).
false = refused (for example an identity with a NUL byte).Source§fn cancel_auth_ticket(&self, op: u64)
fn cancel_auth_ticket(&self, op: u64)
op (pending or delivered). Unknown ops are ignored.Source§impl Clone for FakeSteamBackend
impl Clone for FakeSteamBackend
Source§impl Debug for FakeSteamBackend
impl Debug for FakeSteamBackend
Source§impl Default for FakeSteamBackend
impl Default for FakeSteamBackend
Source§impl FriendsBackend for FakeSteamBackend
Available on crate feature friends only.
impl FriendsBackend for FakeSteamBackend
friends only.Source§fn current_app_id(&self) -> u32
fn current_app_id(&self) -> u32
Source§fn friend_ids(&self) -> Vec<u64>
fn friend_ids(&self) -> Vec<u64>
Source§fn persona_name(&self, id: u64) -> String
fn persona_name(&self, id: u64) -> String
Source§fn persona_nickname(&self, id: u64) -> Option<String>
fn persona_nickname(&self, id: u64) -> Option<String>
Source§fn persona_state(&self, id: u64) -> PersonaState
fn persona_state(&self, id: u64) -> PersonaState
Source§fn game_played(&self, id: u64) -> Option<FriendGame>
fn game_played(&self, id: u64) -> Option<FriendGame>
Source§fn friend_rich_presence(&self, id: u64, key: &str) -> Option<String>
fn friend_rich_presence(&self, id: u64, key: &str) -> Option<String>
None when unset or empty). Steam shares the rich
presence of friends playing the same game; others’ is generally not available.Source§fn local_persona(&self) -> (String, PersonaState)
fn local_persona(&self) -> (String, PersonaState)
Away,
Invisible, …). The real backend reads it like a friend’s state, with the local user’s
own id.Source§fn invite_user_to_game(&self, id: u64, connect: &str) -> bool
fn invite_user_to_game(&self, id: u64, connect: &str) -> bool
connect (at most MAX_CONNECT_BYTES, no NUL).
true = the call was made (Steam gives no delivery receipt).Source§fn request_user_information(&self, id: u64, name_only: bool) -> bool
fn request_user_information(&self, id: u64, name_only: bool) -> bool
name_only). true = it
is being loaded (a PersonaChanged event follows); false = it is already available.Source§fn friend_avatar(
&self,
id: u64,
_size: AvatarSize,
) -> Option<(u32, u32, Vec<u8>)>
fn friend_avatar( &self, id: u64, _size: AvatarSize, ) -> Option<(u32, u32, Vec<u8>)>
(width, height, RGBA bytes), or None when Steam has none (or has not loaded it).Source§impl LeaderboardBackend for FakeSteamBackend
Available on crate feature leaderboards only.
impl LeaderboardBackend for FakeSteamBackend
leaderboards only.Source§fn find_leaderboard(
&self,
op: u64,
name: &str,
create: Option<(LeaderboardSort, LeaderboardDisplay)>,
) -> bool
fn find_leaderboard( &self, op: u64, name: &str, create: Option<(LeaderboardSort, LeaderboardDisplay)>, ) -> bool
create when given and missing. Outcome:
LeaderboardFound, LeaderboardNotFound or LeaderboardIoFailure with this op.Source§fn upload_score(
&self,
op: u64,
board: u64,
method: UploadMethod,
score: i32,
details: &[i32],
) -> bool
fn upload_score( &self, op: u64, board: u64, method: UploadMethod, score: i32, details: &[i32], ) -> bool
MAX_LEADERBOARD_DETAILS details) to a found board. Outcome:
LeaderboardScoreUploaded, LeaderboardUploadRejected or LeaderboardIoFailure.Source§fn download_scores(&self, op: u64, board: u64, range: ScoreRange) -> bool
fn download_scores(&self, op: u64, board: u64, range: ScoreRange) -> bool
MAX_LEADERBOARD_DETAILS
details per entry). Outcome: LeaderboardScoresDownloaded or LeaderboardIoFailure.Source§fn leaderboard_sort(&self, board: u64) -> Option<LeaderboardSort>
fn leaderboard_sort(&self, board: u64) -> Option<LeaderboardSort>
None when unknown).Source§fn leaderboard_display(&self, board: u64) -> Option<LeaderboardDisplay>
fn leaderboard_display(&self, board: u64) -> Option<LeaderboardDisplay>
None when unknown).Source§fn leaderboard_entry_count(&self, board: u64) -> i32
fn leaderboard_entry_count(&self, board: u64) -> i32
Source§impl LobbyBackend for FakeSteamBackend
Available on crate feature lobby only.
impl LobbyBackend for FakeSteamBackend
lobby only.Source§fn create_lobby(&self, kind: LobbyKind, max_members: u32)
fn create_lobby(&self, kind: LobbyKind, max_members: u32)
BackendEvent::LobbyCreated or
BackendEvent::LobbyCreateFailed from a following pump.Source§fn join_lobby(&self, lobby: u64)
fn join_lobby(&self, lobby: u64)
BackendEvent::LobbyEntered or
BackendEvent::LobbyJoinFailed from a following pump.Source§fn leave_lobby(&self, lobby: u64)
fn leave_lobby(&self, lobby: u64)
Source§fn set_lobby_data(&self, lobby: u64, key: &str, value: &str) -> bool
fn set_lobby_data(&self, lobby: u64, key: &str, value: &str) -> bool
false on failure.Source§fn lobby_data(&self, lobby: u64, key: &str) -> Option<String>
fn lobby_data(&self, lobby: u64, key: &str) -> Option<String>
None when missing.Source§fn lobby_member_count(&self, lobby: u64) -> usize
fn lobby_member_count(&self, lobby: u64) -> usize
Source§fn set_lobby_joinable(&self, lobby: u64, joinable: bool) -> bool
fn set_lobby_joinable(&self, lobby: u64, joinable: bool) -> bool
false on failure.Source§fn set_rich_presence(&self, key: &str, value: Option<&str>) -> bool
fn set_rich_presence(&self, key: &str, value: Option<&str>) -> bool
Some) or remove (None) one rich-presence key. false on failure.Source§fn clear_rich_presence(&self)
fn clear_rich_presence(&self)
Source§impl OverlayBackend for FakeSteamBackend
Available on crate feature overlay only.
impl OverlayBackend for FakeSteamBackend
overlay only.Source§fn overlay_enabled(&self) -> bool
fn overlay_enabled(&self) -> bool
Source§fn open_overlay(&self, request: &OpenOverlay) -> bool
fn open_overlay(&self, request: &OpenOverlay) -> bool
true = the call was made (Steam gives no answer).Source§impl StatsBackend for FakeSteamBackend
Available on crate feature stats only.
impl StatsBackend for FakeSteamBackend
stats only.Source§fn is_ready(&self, probe: Option<&str>) -> bool
fn is_ready(&self, probe: Option<&str>) -> bool
probe is a stat or achievement name to test with
(None: the backend picks its own test). Must be cheap: called about once a second until
it returns true.Source§fn get_stat(&self, name: &str, kind: StatKind) -> Option<StatValue>
fn get_stat(&self, name: &str, kind: StatKind) -> Option<StatValue>
None: unknown name, wrong kind, or not loaded.Source§fn set_stat(&self, name: &str, value: StatValue) -> bool
fn set_stat(&self, name: &str, value: StatValue) -> bool
false: unknown name, wrong kind, not loaded, or not finite.Source§fn achievement(&self, name: &str) -> Option<bool>
fn achievement(&self, name: &str) -> Option<bool>
None: unknown name or not loaded.Source§fn unlock_achievement(&self, name: &str) -> bool
fn unlock_achievement(&self, name: &str) -> bool
false on failure.Source§fn clear_achievement(&self, name: &str) -> bool
fn clear_achievement(&self, name: &str) -> bool
false on failure.Source§fn indicate_achievement_progress(
&self,
name: &str,
current: u32,
max: u32,
) -> bool
fn indicate_achievement_progress( &self, name: &str, current: u32, max: u32, ) -> bool
false on failure.Source§fn store_stats(&self) -> bool
fn store_stats(&self) -> bool
true = the store was started; its outcome arrives
later. false = refused locally (nothing to store for this app, stats not loaded).Source§fn reset_all_stats(&self, achievements_too: bool) -> bool
fn reset_all_stats(&self, achievements_too: bool) -> bool
false on failure.Source§impl SteamBackend for FakeSteamBackend
impl SteamBackend for FakeSteamBackend
Source§fn friend_name(&self, id: u64) -> String
fn friend_name(&self, id: u64) -> String
"[unknown]" for a user it knows nothing about (Valve’s GetFriendPersonaName), the fake
backend returns "".Source§fn launch_command_line(&self) -> String
fn launch_command_line(&self) -> String
Source§fn pump(&self) -> Vec<BackendEvent>
fn pump(&self) -> Vec<BackendEvent>
crate::SteamKitSystems::Pump; never call it yourself. A backend that learns Steam is
gone returns BackendEvent::SteamLost; a panic in here is caught by the kit (in a build
that unwinds) and treated the same way (SteamLostReason::PumpPanicked).Source§fn lobby(&self) -> Option<&dyn LobbyBackend>
fn lobby(&self) -> Option<&dyn LobbyBackend>
lobby only.lobby). The default is
None: the lobby feature then treats Steam as unavailable and answers requests with
crate::LobbyErrorKind::NoBackend.Source§fn stats(&self) -> Option<&dyn StatsBackend>
fn stats(&self) -> Option<&dyn StatsBackend>
stats only.stats). The default is None:
the stats feature then treats Steam as unavailable and answers requests with
crate::StatsErrorKind::NoBackend.Source§fn leaderboards(&self) -> Option<&dyn LeaderboardBackend>
fn leaderboards(&self) -> Option<&dyn LeaderboardBackend>
leaderboards only.leaderboards). The default is None: the
leaderboards feature then treats Steam as unavailable and answers requests with
crate::LeaderboardErrorKind::NoBackend.Source§fn auth(&self) -> Option<&dyn AuthBackend>
fn auth(&self) -> Option<&dyn AuthBackend>
auth only.auth). The default is None: the auth
feature then answers requests with crate::AuthErrorKind::NoBackend.Source§fn friends(&self) -> Option<&dyn FriendsBackend>
fn friends(&self) -> Option<&dyn FriendsBackend>
friends only.friends). The default is None: the friends
feature then treats Steam as unavailable (crate::FriendsErrorKind::NoBackend).Source§fn overlay(&self) -> Option<&dyn OverlayBackend>
fn overlay(&self) -> Option<&dyn OverlayBackend>
overlay only.overlay). The default is None: the overlay
feature then answers requests with crate::OverlayErrorKind::NoBackend.Auto Trait Implementations§
impl Freeze for FakeSteamBackend
impl RefUnwindSafe for FakeSteamBackend
impl Send for FakeSteamBackend
impl Sync for FakeSteamBackend
impl Unpin for FakeSteamBackend
impl UnsafeUnpin for FakeSteamBackend
impl UnwindSafe for FakeSteamBackend
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> ConditionalSend for Twhere
T: Send,
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>, which can then be
downcast into Box<dyn 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>, which 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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromTemplate for T
impl<T> FromTemplate 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
Creates Self using default().
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.