Files
phy/bevy_utils/index.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

26 lines
20 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="General utilities for first-party Bevy engine crates."><title>bevy_utils - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bevy_utils" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://bevyengine.org/assets/icon.png"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../bevy_utils/index.html"><img src="https://bevyengine.org/assets/icon.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../bevy_utils/index.html"><img src="https://bevyengine.org/assets/icon.png" alt="logo"></a><h2><a href="../bevy_utils/index.html">bevy_<wbr>utils</a><span class="version">0.15.1</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>bevy_utils</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/bevy_utils/lib.rs.html#1-463">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>General utilities for first-party <a href="https://bevyengine.org/">Bevy</a> engine crates.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.hashbrown"><code>pub use <a class="mod" href="../hashbrown/index.html" title="mod hashbrown">hashbrown</a>;</code></div></li><li><div class="item-name" id="reexport.tracing"><code>pub use <a class="mod" href="../tracing/index.html" title="mod tracing">tracing</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="futures/index.html" title="mod bevy_utils::futures">futures</a></div><div class="desc docblock-short">Utilities for working with <a href="https://doc.rust-lang.org/1.84.0/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future</code></a>s.</div></li><li><div class="item-name"><a class="mod" href="prelude/index.html" title="mod bevy_utils::prelude">prelude</a></div><div class="desc docblock-short">The utilities prelude.</div></li><li><div class="item-name"><a class="mod" href="synccell/index.html" title="mod bevy_utils::synccell">synccell</a></div><div class="desc docblock-short">A reimplementation of the currently unstable <a href="https://doc.rust-lang.org/nightly/std/sync/struct.Exclusive.html"><code>std::sync::Exclusive</code></a></div></li><li><div class="item-name"><a class="mod" href="syncunsafecell/index.html" title="mod bevy_utils::syncunsafecell">syncunsafecell</a></div><div class="desc docblock-short">A reimplementation of the currently unstable <a href="https://doc.rust-lang.org/nightly/std/cell/struct.SyncUnsafeCell.html"><code>std::cell::SyncUnsafeCell</code></a></div></li></ul><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="macro" href="macro.all_tuples.html" title="macro bevy_utils::all_tuples">all_<wbr>tuples</a></div><div class="desc docblock-short">Helper macro to generate tuple pyramids. Useful to generate scaffolding to work around Rust
lacking variadics. Invoking <code>all_tuples!(impl_foo, start, end, P, Q, ..)</code>
invokes <code>impl_foo</code> providing ident tuples through arity <code>start..=end</code>.
If you require the length of the tuple, see <a href="macro.all_tuples_with_size.html" title="macro bevy_utils::all_tuples_with_size"><code>all_tuples_with_size!</code></a>.</div></li><li><div class="item-name"><a class="macro" href="macro.all_tuples_with_size.html" title="macro bevy_utils::all_tuples_with_size">all_<wbr>tuples_<wbr>with_<wbr>size</a></div><div class="desc docblock-short">Helper macro to generate tuple pyramids with their length. Useful to generate scaffolding to
work around Rust lacking variadics. Invoking <code>all_tuples_with_size!(impl_foo, start, end, P, Q, ..)</code>
invokes <code>impl_foo</code> providing ident tuples through arity <code>start..=end</code> preceded by their length.
If you dont require the length of the tuple, see <a href="macro.all_tuples.html" title="macro bevy_utils::all_tuples"><code>all_tuples!</code></a>.</div></li><li><div class="item-name"><a class="macro" href="macro.debug_once.html" title="macro bevy_utils::debug_once">debug_<wbr>once</a></div><div class="desc docblock-short">Call <a href="../tracing/macro.debug.html" title="macro tracing::debug"><code>debug!</code></a> once per call site.</div></li><li><div class="item-name"><a class="macro" href="macro.detailed_trace.html" title="macro bevy_utils::detailed_trace">detailed_<wbr>trace</a></div><div class="desc docblock-short">Like <a href="../tracing/macro.trace.html" title="macro tracing::trace"><code>tracing::trace</code></a>, but conditional on cargo feature <code>detailed_trace</code>.</div></li><li><div class="item-name"><a class="macro" href="macro.error_once.html" title="macro bevy_utils::error_once">error_<wbr>once</a></div><div class="desc docblock-short">Call <a href="../tracing/macro.error.html" title="macro tracing::error"><code>error!</code></a> once per call site.</div></li><li><div class="item-name"><a class="macro" href="macro.info_once.html" title="macro bevy_utils::info_once">info_<wbr>once</a></div><div class="desc docblock-short">Call <a href="../tracing/macro.info.html" title="macro tracing::info"><code>info!</code></a> once per call site.</div></li><li><div class="item-name"><a class="macro" href="macro.once.html" title="macro bevy_utils::once">once</a></div><div class="desc docblock-short">Call some expression only once per call site.</div></li><li><div class="item-name"><a class="macro" href="macro.trace_once.html" title="macro bevy_utils::trace_once">trace_<wbr>once</a></div><div class="desc docblock-short">Call <a href="../tracing/macro.trace.html" title="macro tracing::trace"><code>trace!</code></a> once per call site.</div></li><li><div class="item-name"><a class="macro" href="macro.warn_once.html" title="macro bevy_utils::warn_once">warn_<wbr>once</a></div><div class="desc docblock-short">Call <a href="../tracing/macro.warn.html" title="macro tracing::warn"><code>warn!</code></a> once per call site.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.AHasher.html" title="struct bevy_utils::AHasher">AHasher</a></div><div class="desc docblock-short">A <code>Hasher</code> for hashing an arbitrary stream of bytes.</div></li><li><div class="item-name"><a class="struct" href="struct.Duration.html" title="struct bevy_utils::Duration">Duration</a></div><div class="desc docblock-short">A <code>Duration</code> type to represent a span of time, typically used for system
timeouts.</div></li><li><div class="item-name"><a class="struct" href="struct.FixedState.html" title="struct bevy_utils::FixedState">Fixed<wbr>State</a></div><div class="desc docblock-short">A hasher builder that will create a fixed hasher.</div></li><li><div class="item-name"><a class="struct" href="struct.Hashed.html" title="struct bevy_utils::Hashed">Hashed</a></div><div class="desc docblock-short">A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute.</div></li><li><div class="item-name"><a class="struct" href="struct.Instant.html" title="struct bevy_utils::Instant">Instant</a></div><div class="desc docblock-short">A measurement of a monotonically nondecreasing clock.
Opaque and useful only with <a href="struct.Duration.html" title="struct bevy_utils::Duration"><code>Duration</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.NoOpHash.html" title="struct bevy_utils::NoOpHash">NoOp<wbr>Hash</a></div><div class="desc docblock-short"><a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher"><code>BuildHasher</code></a> for types that already contain a high-quality hash.</div></li><li><div class="item-name"><a class="struct" href="struct.OnDrop.html" title="struct bevy_utils::OnDrop">OnDrop</a></div><div class="desc docblock-short">A type which calls a function when dropped.
This can be used to ensure that cleanup code is run even in case of a panic.</div></li><li><div class="item-name"><a class="struct" href="struct.Parallel.html" title="struct bevy_utils::Parallel">Parallel</a></div><div class="desc docblock-short">A cohesive set of thread-local values of a given type.</div></li><li><div class="item-name"><a class="struct" href="struct.PassHash.html" title="struct bevy_utils::PassHash">Pass<wbr>Hash</a></div><div class="desc docblock-short">A <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher"><code>BuildHasher</code></a> that results in a <a href="struct.PassHasher.html" title="struct bevy_utils::PassHasher"><code>PassHasher</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.PassHasher.html" title="struct bevy_utils::PassHasher">Pass<wbr>Hasher</a></div><div class="desc docblock-short">A no-op hash that only works on <code>u64</code>s. Will panic if attempting to
hash a type containing non-u64 fields.</div></li><li><div class="item-name"><a class="struct" href="struct.RandomState.html" title="struct bevy_utils::RandomState">Random<wbr>State</a></div><div class="desc docblock-short">Provides a <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a> factory. This is typically used (e.g. by <a href="https://doc.rust-lang.org/1.84.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>) to create
<a href="struct.AHasher.html" title="struct bevy_utils::AHasher">AHasher</a>s in order to hash the keys of the map. See <code>build_hasher</code> below.</div></li><li><div class="item-name"><a class="struct" href="struct.SystemTime.html" title="struct bevy_utils::SystemTime">System<wbr>Time</a></div><div class="desc docblock-short">A measurement of the system clock, useful for talking to
external entities like the file system or other processes.</div></li><li><div class="item-name"><a class="struct" href="struct.SystemTimeError.html" title="struct bevy_utils::SystemTimeError">System<wbr>Time<wbr>Error</a></div><div class="desc docblock-short">An error returned from the <code>duration_since</code> and <code>elapsed</code> methods on
<code>SystemTime</code>, used to learn how far in the opposite direction a system time
lies.</div></li><li><div class="item-name"><a class="struct" href="struct.TryFromFloatSecsError.html" title="struct bevy_utils::TryFromFloatSecsError">TryFrom<wbr>Float<wbr>Secs<wbr>Error</a></div><div class="desc docblock-short">An error which can be returned when converting a floating-point value of seconds
into a <a href="struct.Duration.html" title="struct bevy_utils::Duration"><code>Duration</code></a>.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.ConditionalSend.html" title="trait bevy_utils::ConditionalSend">Conditional<wbr>Send</a></div><div class="desc docblock-short">Use <a href="trait.ConditionalSend.html" title="trait bevy_utils::ConditionalSend"><code>ConditionalSend</code></a> to mark an optional Send trait bound. Useful as on certain platforms (eg. Wasm),
futures arent Send.</div></li><li><div class="item-name"><a class="trait" href="trait.ConditionalSendFuture.html" title="trait bevy_utils::ConditionalSendFuture">Conditional<wbr>Send<wbr>Future</a></div><div class="desc docblock-short">Use <a href="trait.ConditionalSendFuture.html" title="trait bevy_utils::ConditionalSendFuture"><code>ConditionalSendFuture</code></a> for a future with an optional Send trait bound, as on certain platforms (eg. Wasm),
futures arent Send.</div></li><li><div class="item-name"><a class="trait" href="trait.PreHashMapExt.html" title="trait bevy_utils::PreHashMapExt">PreHash<wbr>MapExt</a></div><div class="desc docblock-short">Extension methods intended to add functionality to <a href="type.PreHashMap.html" title="type bevy_utils::PreHashMap"><code>PreHashMap</code></a>.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.assert_object_safe.html" title="fn bevy_utils::assert_object_safe">assert_<wbr>object_<wbr>safe</a></div><div class="desc docblock-short">Assert that a given <code>T</code> is <a href="https://doc.rust-lang.org/reference/items/traits.html#object-safety">object safe</a>.
Will fail to compile if that is not the case.</div></li><li><div class="item-name"><a class="fn" href="fn.dbg.html" title="fn bevy_utils::dbg">dbg</a></div><div class="desc docblock-short">Calls the <a href="../tracing/macro.debug.html" title="macro tracing::debug"><code>tracing::debug!</code></a> macro on a value.</div></li><li><div class="item-name"><a class="fn" href="fn.default.html" title="fn bevy_utils::default">default</a></div><div class="desc docblock-short">An ergonomic abbreviation for <a href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html#tymethod.default" title="associated function core::default::Default::default"><code>Default::default()</code></a> to make initializing structs easier.</div></li><li><div class="item-name"><a class="fn" href="fn.error.html" title="fn bevy_utils::error">error</a></div><div class="desc docblock-short">Processes a <a href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a> by calling the <a href="../tracing/macro.error.html" title="macro tracing::error"><code>tracing::error!</code></a> macro in case of an <a href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Err</code></a> value.</div></li><li><div class="item-name"><a class="fn" href="fn.info.html" title="fn bevy_utils::info">info</a></div><div class="desc docblock-short">Calls the <a href="../tracing/macro.info.html" title="macro tracing::info"><code>tracing::info!</code></a> macro on a value.</div></li><li><div class="item-name"><a class="fn" href="fn.warn.html" title="fn bevy_utils::warn">warn</a></div><div class="desc docblock-short">Processes a <a href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a> by calling the <a href="../tracing/macro.warn.html" title="macro tracing::warn"><code>tracing::warn!</code></a> macro in case of an <a href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Err</code></a> value.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.BoxedFuture.html" title="type bevy_utils::BoxedFuture">Boxed<wbr>Future</a></div><div class="desc docblock-short">An owned and dynamically typed Future used when you cant statically type your result or need to add some indirection.</div></li><li><div class="item-name"><a class="type" href="type.Entry.html" title="type bevy_utils::Entry">Entry</a></div><div class="desc docblock-short">A shortcut alias for <a href="../hashbrown/map/enum.Entry.html" title="enum hashbrown::map::Entry"><code>hashbrown::hash_map::Entry</code></a>.</div></li><li><div class="item-name"><a class="type" href="type.HashMap.html" title="type bevy_utils::HashMap">HashMap</a></div><div class="desc docblock-short">A <a href="../hashbrown/map/struct.HashMap.html" title="struct hashbrown::map::HashMap"><code>HashMap</code></a> implementing aHash, a high
speed keyed hashing algorithm intended for use in in-memory hashmaps.</div></li><li><div class="item-name"><a class="type" href="type.HashSet.html" title="type bevy_utils::HashSet">HashSet</a></div><div class="desc docblock-short">A <a href="../hashbrown/set/struct.HashSet.html" title="struct hashbrown::set::HashSet"><code>HashSet</code></a> implementing aHash, a high
speed keyed hashing algorithm intended for use in in-memory hashmaps.</div></li><li><div class="item-name"><a class="type" href="type.PreHashMap.html" title="type bevy_utils::PreHashMap">PreHash<wbr>Map</a></div><div class="desc docblock-short">A <a href="type.HashMap.html" title="type bevy_utils::HashMap"><code>HashMap</code></a> pre-configured to use <a href="struct.Hashed.html" title="struct bevy_utils::Hashed"><code>Hashed</code></a> keys and <a href="struct.PassHash.html" title="struct bevy_utils::PassHash"><code>PassHash</code></a> passthrough hashing.
Iteration order only depends on the order of insertions and deletions.</div></li><li><div class="item-name"><a class="type" href="type.StableHashMap.html" title="type bevy_utils::StableHashMap">Stable<wbr>Hash<wbr>Map</a><wbr><span class="stab deprecated" title="">Deprecated</span></div><div class="desc docblock-short">A stable hash map implementing aHash, a high speed keyed hashing algorithm
intended for use in in-memory hashmaps.</div></li><li><div class="item-name"><a class="type" href="type.StableHashSet.html" title="type bevy_utils::StableHashSet">Stable<wbr>Hash<wbr>Set</a><wbr><span class="stab deprecated" title="">Deprecated</span></div><div class="desc docblock-short">A stable hash set implementing aHash, a high speed keyed hashing algorithm
intended for use in in-memory hashmaps.</div></li><li><div class="item-name"><a class="type" href="type.TypeIdMap.html" title="type bevy_utils::TypeIdMap">Type<wbr>IdMap</a></div><div class="desc docblock-short">A specialized hashmap type with Key of <a href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId"><code>TypeId</code></a>
Iteration order only depends on the order of insertions and deletions.</div></li></ul></section></div></main></body></html>