repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_time/src/time.rs
crates/bevy_time/src/time.rs
use bevy_ecs::resource::Resource; use core::time::Duration; #[cfg(feature = "bevy_reflect")] use { bevy_ecs::reflect::ReflectResource, bevy_reflect::{std_traits::ReflectDefault, Reflect}, }; /// A generic clock resource that tracks how much it has advanced since its /// previous update and since its creation. ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_time/src/timer.rs
crates/bevy_time/src/timer.rs
use crate::Stopwatch; #[cfg(feature = "bevy_reflect")] use bevy_reflect::prelude::*; use core::time::Duration; /// Tracks elapsed time. Enters the finished state once `duration` is reached. /// /// Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. /// /// # Timer modes /// /// There are...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_time/src/common_conditions.rs
crates/bevy_time/src/common_conditions.rs
use crate::{Real, Time, Timer, TimerMode, Virtual}; use bevy_ecs::system::Res; use core::time::Duration; /// Run condition that is active on a regular time interval, using [`Time`] to advance /// the timer. The timer ticks at the rate of [`Time::relative_speed`]. /// /// ```no_run /// # use bevy_app::{App, NoopPluginG...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_time/src/stopwatch.rs
crates/bevy_time/src/stopwatch.rs
#[cfg(feature = "bevy_reflect")] use bevy_reflect::{prelude::*, Reflect}; use core::time::Duration; /// A Stopwatch is a struct that tracks elapsed time when started. /// /// Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called. /// # Examples /// /// ``` /// # use bevy_time::*; ///...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_time/src/real.rs
crates/bevy_time/src/real.rs
use bevy_platform::time::Instant; #[cfg(feature = "bevy_reflect")] use bevy_reflect::{std_traits::ReflectDefault, Reflect}; use core::time::Duration; use crate::time::Time; /// Real time clock representing elapsed wall clock time. /// /// A specialization of the [`Time`] structure. **For method documentation, see ///...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_log/src/lib.rs
crates/bevy_log/src/lib.rs
#![cfg_attr(docsrs, feature(doc_cfg))] #![doc( html_logo_url = "https://bevy.org/assets/icon.png", html_favicon_url = "https://bevy.org/assets/icon.png" )] //! This crate provides logging functions and configuration for [Bevy](https://bevy.org) //! apps, and automatically configures platform specific log handl...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_log/src/once.rs
crates/bevy_log/src/once.rs
/// Call [`trace!`](crate::trace) once per call site. /// /// Useful for logging within systems which are called every frame. #[macro_export] macro_rules! trace_once { ($($arg:tt)+) => ({ $crate::once!($crate::trace!($($arg)+)) }); } /// Call [`debug!`](crate::debug) once per call site. /// /// Useful ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_log/src/android_tracing.rs
crates/bevy_log/src/android_tracing.rs
use alloc::ffi::CString; use core::fmt::{Debug, Write}; use tracing::{ field::Field, span::{Attributes, Record}, Event, Id, Level, Subscriber, }; use tracing_subscriber::{field::Visit, layer::Context, registry::LookupSpan, Layer}; #[derive(Default)] pub(crate) struct AndroidLayer; struct StringRecorder(St...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/glyph.rs
crates/bevy_text/src/glyph.rs
//! This module exports types related to rendering glyphs. use bevy_asset::AssetId; use bevy_image::prelude::*; use bevy_math::{IVec2, Vec2}; use bevy_reflect::Reflect; /// A glyph of a font, typically representing a single character, positioned in screen space. /// /// Contains information about how and where to ren...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/font_loader.rs
crates/bevy_text/src/font_loader.rs
use crate::Font; use bevy_asset::{io::Reader, AssetLoader, LoadContext}; use bevy_reflect::TypePath; use cosmic_text::skrifa::raw::ReadError; use thiserror::Error; #[derive(Default, TypePath)] /// An [`AssetLoader`] for [`Font`]s, for use by the [`AssetServer`](bevy_asset::AssetServer) pub struct FontLoader; /// Poss...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/lib.rs
crates/bevy_text/src/lib.rs
//! This crate provides the tools for positioning and rendering text in Bevy. //! //! # `Font` //! //! Fonts contain information for drawing glyphs, which are shapes that typically represent a single character, //! but in some cases part of a "character" (grapheme clusters) or more than one character (ligatures). //! /...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/font_atlas.rs
crates/bevy_text/src/font_atlas.rs
use bevy_asset::{Assets, Handle, RenderAssetUsages}; use bevy_image::{prelude::*, ImageSampler, ToExtents}; use bevy_math::{IVec2, UVec2}; use bevy_platform::collections::HashMap; use wgpu_types::{Extent3d, TextureDimension, TextureFormat}; use crate::{FontSmoothing, GlyphAtlasInfo, GlyphAtlasLocation, TextError}; //...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/bounds.rs
crates/bevy_text/src/bounds.rs
use bevy_ecs::{component::Component, reflect::ReflectComponent}; use bevy_math::Vec2; use bevy_reflect::{std_traits::ReflectDefault, Reflect}; /// The maximum width and height of text. The text will wrap according to the specified size. /// /// Characters out of the bounds after wrapping will be truncated. Text is ali...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/text.rs
crates/bevy_text/src/text.rs
use crate::{Font, TextLayoutInfo, TextSpanAccess, TextSpanComponent}; use bevy_asset::Handle; use bevy_color::Color; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::{prelude::*, reflect::ReflectComponent}; use bevy_reflect::prelude::*; use bevy_utils::{default, once}; use core::fmt::{Debug, Formatter}; use core::str:...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/font.rs
crates/bevy_text/src/font.rs
use alloc::sync::Arc; use bevy_asset::Asset; use bevy_asset::AssetEvent; use bevy_asset::Assets; use bevy_ecs::message::MessageReader; use bevy_ecs::system::Query; use bevy_ecs::system::ResMut; use bevy_reflect::TypePath; use cosmic_text::fontdb::ID; use cosmic_text::skrifa::raw::ReadError; use cosmic_text::skrifa::Fo...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/error.rs
crates/bevy_text/src/error.rs
use cosmic_text::CacheKey; use thiserror::Error; #[derive(Debug, PartialEq, Eq, Error)] /// Errors related to the textsystem pub enum TextError { /// Font was not found, this could be that the font has not yet been loaded, or /// that the font failed to load for some other reason #[error("font not found")]...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/pipeline.rs
crates/bevy_text/src/pipeline.rs
use alloc::sync::Arc; use bevy_asset::{AssetId, Assets}; use bevy_color::Color; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::{ component::Component, entity::Entity, reflect::ReflectComponent, resource::Resource, system::ResMut, }; use bevy_image::prelude::*; use bevy_log::{once, warn}; use bevy_math::{Rec...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/text_access.rs
crates/bevy_text/src/text_access.rs
use bevy_color::Color; use bevy_ecs::{ component::Mutable, prelude::*, system::{Query, SystemParam}, }; use crate::{LineHeight, TextColor, TextFont, TextSpan}; /// Helper trait for using the [`TextReader`] and [`TextWriter`] system params. pub trait TextSpanAccess: Component<Mutability = Mutable> { //...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_text/src/font_atlas_set.rs
crates/bevy_text/src/font_atlas_set.rs
use crate::{FontAtlas, FontSmoothing}; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::resource::Resource; use bevy_platform::collections::HashMap; use cosmic_text::fontdb::ID; /// Identifies the font atlases for a particular font in [`FontAtlasSet`] /// /// Allows an `f32` font size to be used as a key in a `HashMa...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/lib.rs
crates/bevy_sprite/src/lib.rs
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_cfg))] #![forbid(unsafe_code)] #![doc( html_logo_url = "https://bevy.org/assets/icon.png", html_favicon_url = "https://bevy.org/assets/icon.png" )] //! Provides 2D sprite functionality. extern crate a...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/text2d.rs
crates/bevy_sprite/src/text2d.rs
use crate::{Anchor, Sprite}; use bevy_asset::Assets; use bevy_camera::primitives::Aabb; use bevy_camera::visibility::{ self, NoFrustumCulling, RenderLayers, Visibility, VisibilityClass, VisibleEntities, }; use bevy_camera::Camera; use bevy_color::Color; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::entity::Enti...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/picking_backend.rs
crates/bevy_sprite/src/picking_backend.rs
//! A [`bevy_picking`] backend for sprites. Works for simple sprites and sprite atlases. Works for //! sprites with arbitrary transforms. //! //! By default, picking for sprites is based on pixel opacity. //! A sprite is picked only when a pointer is over an opaque pixel. //! Alternatively, you can configure picking to...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/sprite.rs
crates/bevy_sprite/src/sprite.rs
use bevy_asset::{AsAssetId, AssetId, Assets, Handle}; use bevy_camera::visibility::{self, Visibility, VisibilityClass}; use bevy_color::Color; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::{component::Component, reflect::ReflectComponent}; use bevy_image::{Image, TextureAtlas, TextureAtlasLayout}; use bevy_math::{R...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/texture_slice/border_rect.rs
crates/bevy_sprite/src/texture_slice/border_rect.rs
use bevy_math::Vec2; use bevy_reflect::{std_traits::ReflectDefault, Reflect}; /// Defines border insets that shrink a rectangle from its minimum and maximum corners. /// /// This struct is used to represent thickness or offsets from the four edges /// of a rectangle, with values increasing inwards. #[derive(Default, C...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/texture_slice/mod.rs
crates/bevy_sprite/src/texture_slice/mod.rs
mod border_rect; mod slicer; use bevy_math::{Rect, Vec2}; pub use border_rect::BorderRect; pub use slicer::{SliceScaleMode, TextureSlicer}; /// Single texture slice, representing a texture rect to draw in a given area #[derive(Debug, Clone, PartialEq)] pub struct TextureSlice { /// texture area to draw pub te...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_sprite/src/texture_slice/slicer.rs
crates/bevy_sprite/src/texture_slice/slicer.rs
use super::{BorderRect, TextureSlice}; use bevy_math::{vec2, Rect, Vec2}; use bevy_reflect::{std_traits::ReflectDefault, Reflect}; /// Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes /// without needing to prepare multiple assets. The associated texture will be split ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/lib.rs
crates/bevy_gltf/src/lib.rs
#![cfg_attr(docsrs, feature(doc_cfg))] #![forbid(unsafe_code)] #![doc( html_logo_url = "https://bevy.org/assets/icon.png", html_favicon_url = "https://bevy.org/assets/icon.png" )] //! Plugin providing an [`AssetLoader`](bevy_asset::AssetLoader) and type definitions //! for loading glTF 2.0 (a standard 3D scene...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/convert_coordinates.rs
crates/bevy_gltf/src/convert_coordinates.rs
//! Utilities for converting from glTF's [standard coordinate system](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#coordinate-system-and-units) //! to Bevy's. use serde::{Deserialize, Serialize}; use bevy_math::{Mat4, Quat, Vec3}; use bevy_transform::components::Transform; pub(crate) trait ConvertCoordin...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/vertex_attributes.rs
crates/bevy_gltf/src/vertex_attributes.rs
use bevy_mesh::{Mesh, MeshVertexAttribute, VertexAttributeValues as Values, VertexFormat}; use bevy_platform::collections::HashMap; use gltf::{ accessor::{DataType, Dimensions}, mesh::util::{ReadColors, ReadJoints, ReadTexCoords, ReadWeights}, }; use thiserror::Error; use crate::convert_coordinates::ConvertCoo...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/label.rs
crates/bevy_gltf/src/label.rs
//! Labels that can be used to load part of a glTF use bevy_asset::AssetPath; /// Labels that can be used to load part of a glTF /// /// You can use [`GltfAssetLabel::from_asset`] to add it to an asset path /// /// ``` /// # use bevy_ecs::prelude::*; /// # use bevy_asset::prelude::*; /// # use bevy_scene::prelude::*;...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/assets.rs
crates/bevy_gltf/src/assets.rs
//! Representation of assets present in a glTF file use core::ops::Deref; #[cfg(feature = "bevy_animation")] use bevy_animation::AnimationClip; use bevy_asset::{Asset, Handle}; use bevy_ecs::{component::Component, reflect::ReflectComponent}; use bevy_mesh::{skinning::SkinnedMeshInverseBindposes, Mesh}; use bevy_pbr::...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/mod.rs
crates/bevy_gltf/src/loader/mod.rs
pub mod extensions; mod gltf_ext; use alloc::sync::Arc; use async_lock::RwLock; #[cfg(feature = "bevy_animation")] use bevy_animation::{prelude::*, AnimatedBy, AnimationTargetId}; use bevy_asset::{ io::Reader, AssetLoadError, AssetLoader, AssetPath, Handle, LoadContext, ParseAssetPathError, ReadAssetBytesError...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/gltf_ext/texture.rs
crates/bevy_gltf/src/loader/gltf_ext/texture.rs
use bevy_image::{ImageAddressMode, ImageFilterMode, ImageSamplerDescriptor}; use bevy_math::Affine2; use gltf::texture::{MagFilter, MinFilter, Texture, TextureTransform, WrappingMode}; /// Extracts the texture sampler data from the glTF [`Texture`]. pub(crate) fn texture_sampler( texture: &Texture<'_>, defaul...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/gltf_ext/mesh.rs
crates/bevy_gltf/src/loader/gltf_ext/mesh.rs
use bevy_mesh::PrimitiveTopology; use gltf::{ mesh::{Mesh, Mode}, Material, }; use crate::GltfError; pub(crate) fn primitive_name(mesh: &Mesh<'_>, material: &Material) -> String { let mesh_name = mesh.name().unwrap_or("Mesh"); if let Some(material_name) = material.name() { format!("{mesh_nam...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/gltf_ext/scene.rs
crates/bevy_gltf/src/loader/gltf_ext/scene.rs
use bevy_ecs::name::Name; use bevy_math::{Mat4, Vec3}; use bevy_transform::components::Transform; use gltf::scene::Node; use fixedbitset::FixedBitSet; use itertools::Itertools; #[cfg(feature = "bevy_animation")] use bevy_platform::collections::{HashMap, HashSet}; use crate::GltfError; pub(crate) fn node_name(node:...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/gltf_ext/material.rs
crates/bevy_gltf/src/loader/gltf_ext/material.rs
use bevy_math::Affine2; use bevy_pbr::UvChannel; use bevy_render::alpha::AlphaMode; use gltf::{json::texture::Info, Material}; use serde_json::value; use crate::GltfAssetLabel; use super::texture::texture_transform_to_affine2; #[cfg(any( feature = "pbr_anisotropy_texture", feature = "pbr_specular_textures"...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/gltf_ext/mod.rs
crates/bevy_gltf/src/loader/gltf_ext/mod.rs
//! Methods to access information from [`gltf`] types pub mod material; pub mod mesh; pub mod scene; pub mod texture; use bevy_platform::collections::HashSet; use fixedbitset::FixedBitSet; use gltf::{Document, Gltf}; use super::GltfError; use self::{material::extension_texture_index, scene::check_is_part_of_cycle}...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/extensions/khr_materials_clearcoat.rs
crates/bevy_gltf/src/loader/extensions/khr_materials_clearcoat.rs
use bevy_asset::{AssetPath, Handle}; use bevy_image::Image; use gltf::Material; use serde_json::Value; #[cfg(feature = "pbr_multi_layer_material_textures")] use {crate::loader::gltf_ext::material::parse_material_extension_texture, bevy_pbr::UvChannel}; /// Parsed data from the `KHR_materials_clearcoat` extension. /...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/extensions/khr_materials_specular.rs
crates/bevy_gltf/src/loader/extensions/khr_materials_specular.rs
use bevy_asset::{AssetPath, Handle}; use bevy_image::Image; use gltf::Material; use serde_json::Value; #[cfg(feature = "pbr_specular_textures")] use {crate::loader::gltf_ext::material::parse_material_extension_texture, bevy_pbr::UvChannel}; /// Parsed data from the `KHR_materials_specular` extension. /// /// We cur...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/extensions/mod.rs
crates/bevy_gltf/src/loader/extensions/mod.rs
//! glTF extensions defined by the Khronos Group and other vendors mod khr_materials_anisotropy; mod khr_materials_clearcoat; mod khr_materials_specular; use alloc::sync::Arc; use async_lock::RwLock; use bevy_asset::{Handle, LoadContext}; use bevy_ecs::{ entity::Entity, resource::Resource, world::{Entity...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_gltf/src/loader/extensions/khr_materials_anisotropy.rs
crates/bevy_gltf/src/loader/extensions/khr_materials_anisotropy.rs
use bevy_asset::{AssetPath, Handle}; use bevy_image::Image; use gltf::Material; use serde_json::Value; #[cfg(feature = "pbr_anisotropy_texture")] use {crate::loader::gltf_ext::material::parse_material_extension_texture, bevy_pbr::UvChannel}; /// Parsed data from the `KHR_materials_anisotropy` extension. /// /// See...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/src/lib.rs
crates/bevy_reflect/compile_fail/src/lib.rs
// Nothing here, check out the integration tests
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/func.rs
crates/bevy_reflect/compile_fail/tests/func.rs
fn main() -> compile_fail_utils::ui_test::Result<()> { compile_fail_utils::test("reflect_into_function", "tests/into_function") }
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/remote.rs
crates/bevy_reflect/compile_fail/tests/remote.rs
fn main() -> compile_fail_utils::ui_test::Result<()> { compile_fail_utils::test("reflect_remote", "tests/reflect_remote") }
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/derive.rs
crates/bevy_reflect/compile_fail/tests/derive.rs
fn main() -> compile_fail_utils::ui_test::Result<()> { compile_fail_utils::test("reflect_derive", "tests/reflect_derive") }
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/into_function/arguments_fail.rs
crates/bevy_reflect/compile_fail/tests/into_function/arguments_fail.rs
#![allow(unused)] use bevy_reflect::func::IntoFunction; use bevy_reflect::Reflect; fn pass(_: i32) {} fn too_many_arguments( arg0: i32, arg1: i32, arg2: i32, arg3: i32, arg4: i32, arg5: i32, arg6: i32, arg7: i32, arg8: i32, arg9: i32, arg10: i32, arg11: i32, arg12:...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/into_function/return_fail.rs
crates/bevy_reflect/compile_fail/tests/into_function/return_fail.rs
#![allow(unused)] use bevy_reflect::func::IntoFunction; use bevy_reflect::Reflect; fn pass() -> i32 { 123 } struct Foo; fn return_not_reflect() -> Foo { Foo } fn return_with_lifetime_pass<'a>(a: &'a String) -> &'a String { a } fn return_with_invalid_lifetime<'a, 'b>(a: &'a String, b: &'b String) -> &'...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/into_function/closure_fail.rs
crates/bevy_reflect/compile_fail/tests/into_function/closure_fail.rs
#![allow(unused)] use bevy_reflect::func::{DynamicFunction, IntoFunction}; use bevy_reflect::Reflect; fn main() { let value = String::from("Hello, World!"); let closure_capture_owned = move || println!("{}", value); // Pass: let _: DynamicFunction<'static> = closure_capture_owned.into_function(); ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/incorrect_wrapper_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/incorrect_wrapper_pass.rs
//@check-pass use bevy_reflect::{reflect_remote, Reflect}; mod external_crate { pub struct TheirFoo { pub value: u32, } } #[reflect_remote(external_crate::TheirFoo)] struct MyFoo { pub value: u32, } #[derive(Reflect)] struct MyStruct { #[reflect(remote = MyFoo)] foo: external_crate::Their...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/incorrect_wrapper_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/incorrect_wrapper_fail.rs
use bevy_reflect::Reflect; mod external_crate { pub struct TheirFoo { pub value: u32, } } #[repr(transparent)] #[derive(Reflect)] #[reflect(from_reflect = false)] struct MyFoo(#[reflect(ignore)] pub external_crate::TheirFoo); #[derive(Reflect)] //~^ ERROR: the trait bound `MyFoo: ReflectRemote` is no...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/type_mismatch_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/type_mismatch_fail.rs
//@no-rustfix mod structs { use bevy_reflect::{reflect_remote, Reflect}; mod external_crate { pub struct TheirFoo { pub value: u32, } pub struct TheirBar { pub value: i32, } } #[reflect_remote(external_crate::TheirFoo)] struct MyFoo { ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/invalid_definition_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/invalid_definition_pass.rs
//@check-pass mod structs { use bevy_reflect::reflect_remote; mod external_crate { pub struct TheirStruct { pub value: u32, } } #[reflect_remote(external_crate::TheirStruct)] struct MyStruct { pub value: u32, } } mod tuple_structs { use bevy_reflect::r...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/macro_order_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/macro_order_fail.rs
use bevy_reflect::{reflect_remote, std_traits::ReflectDefault}; mod external_crate { #[derive(Debug, Default)] pub struct TheirType { pub value: String, } } #[derive(Debug, Default)] #[reflect_remote(external_crate::TheirType)] #[reflect(Debug, Default)] struct MyType { pub value: String, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/nested_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/nested_fail.rs
mod external_crate { pub struct TheirOuter<T> { pub inner: TheirInner<T>, } pub struct TheirInner<T>(pub T); } mod missing_attribute { use bevy_reflect::{FromReflect, GetTypeRegistration, reflect_remote}; #[reflect_remote(super::external_crate::TheirOuter<T>)] struct MyOuter<T: FromRef...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/type_mismatch_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/type_mismatch_pass.rs
//@check-pass mod structs { use bevy_reflect::{reflect_remote, Reflect}; mod external_crate { pub struct TheirFoo { pub value: u32, } pub struct TheirBar { pub value: i32, } } #[reflect_remote(external_crate::TheirFoo)] struct MyFoo { ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/nested_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/nested_pass.rs
//@check-pass use bevy_reflect::{FromReflect, GetTypeRegistration, reflect_remote, Reflect, Typed}; mod external_crate { pub struct TheirOuter<T> { pub inner: TheirInner<T>, } pub struct TheirInner<T>(pub T); } #[reflect_remote(external_crate::TheirOuter<T>)] struct MyOuter<T: FromReflect + Typed ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/macro_order_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/macro_order_pass.rs
//@check-pass use bevy_reflect::{reflect_remote, std_traits::ReflectDefault}; mod external_crate { #[derive(Debug, Default)] pub struct TheirType { pub value: String, } } #[reflect_remote(external_crate::TheirType)] #[derive(Debug, Default)] #[reflect(Debug, Default)] struct MyType { pub value...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_remote/invalid_definition_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_remote/invalid_definition_fail.rs
mod structs { use bevy_reflect::reflect_remote; mod external_crate { pub struct TheirStruct { pub value: u32, } } #[reflect_remote(external_crate::TheirStruct)] //~^ ERROR: `?` operator has incompatible types //~| ERROR: mismatched types struct MyStruct { ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/generics_structs_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/generics_structs_pass.rs
//@check-pass use bevy_reflect::{GetField, Reflect}; #[derive(Reflect)] #[reflect(from_reflect = false)] struct Foo<T, U, S> { a: T, #[reflect(ignore)] _b: U, // check that duplicate types don't cause any compile errors _c: T, // check that when a type is both an active and inactive type, both...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/generics_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/generics_fail.rs
use bevy_reflect::{GetField, Reflect, Struct, TypePath}; #[derive(Reflect)] #[reflect(from_reflect = false)] struct Foo<T> { a: T, } // Type that doesn't implement Reflect #[derive(TypePath)] struct NoReflect(f32); fn main() { let mut foo: Box<dyn Struct> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) }); ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/bounds_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/bounds_pass.rs
//@check-pass use bevy_reflect::prelude::*; #[derive(Default)] struct NonReflect; struct NonReflectNonDefault; mod structs { use super::*; #[derive(Reflect)] struct ReflectGeneric<T> { foo: T, #[reflect(ignore)] _ignored: NonReflect, } #[derive(Reflect)] struct FromR...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/from_reflect_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/from_reflect_pass.rs
//@check-pass use bevy_reflect::{FromReflect, Reflect}; #[derive(Reflect)] #[reflect(from_reflect = false)] #[reflect(from_reflect = false)] struct Foo { value: String, } #[derive(Reflect)] #[reflect(from_reflect = true)] #[reflect(from_reflect = true)] struct Bar { value: String, } #[derive(Reflect, FromRef...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/custom_where_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/custom_where_fail.rs
use bevy_reflect::{FromType, Reflect}; use core::marker::PhantomData; #[derive(Clone)] struct ReflectMyTrait; impl<T> FromType<T> for ReflectMyTrait { fn from_type() -> Self { Self } } // Reason: populated `where` clause must be last with #[reflect(MyTrait)] #[derive(Reflect)] #[reflect(where T: core...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/lifetimes_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/lifetimes_pass.rs
//@check-pass use bevy_reflect::Reflect; // Reason: Reflection relies on `Any` which requires `'static` #[derive(Reflect)] struct Foo<'a: 'static> { #[reflect(ignore)] value: &'a str, }
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/from_reflect_fail.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/from_reflect_fail.rs
use bevy_reflect::{FromReflect, Reflect}; // Reason: Cannot have conflicting `from_reflect` attributes #[derive(Reflect)] #[reflect(from_reflect = false)] #[reflect(from_reflect = true)] //~^ ERROR: already set to false struct Foo { value: String, } // Reason: Cannot have conflicting `from_reflect` attributes #[d...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/nested_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/nested_pass.rs
//@check-pass use bevy_reflect::Reflect; mod nested_generics { use super::*; #[derive(Reflect)] struct Foo<T>(T); #[derive(Reflect)] struct Bar<T>(Foo<T>); #[derive(Reflect)] struct Baz<T>(Bar<Foo<T>>); }
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/compile_fail/tests/reflect_derive/custom_where_pass.rs
crates/bevy_reflect/compile_fail/tests/reflect_derive/custom_where_pass.rs
//@check-pass use bevy_reflect::{FromType, Reflect}; use core::marker::PhantomData; #[derive(Clone)] struct ReflectMyTrait; impl<T> FromType<T> for ReflectMyTrait { fn from_type() -> Self { Self } } #[derive(Reflect)] #[reflect(MyTrait, where T: core::fmt::Debug)] pub struct Foo<T> { value: Strin...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/array.rs
crates/bevy_reflect/src/array.rs
use crate::generics::impl_generic_info_methods; use crate::{ type_info::impl_type_methods, utility::reflect_hasher, ApplyError, Generics, MaybeTyped, PartialReflect, Reflect, ReflectKind, ReflectMut, ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; use alloc::{boxed::Box, vec::Vec}; use bevy_reflect_d...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/std_traits.rs
crates/bevy_reflect/src/std_traits.rs
//! Module containing the [`ReflectDefault`] type. use crate::{FromType, Reflect}; use alloc::boxed::Box; /// A struct used to provide the default value of a type. /// /// A [`ReflectDefault`] for type `T` can be obtained via [`FromType::from_type`]. #[derive(Clone)] pub struct ReflectDefault { default: fn() -> B...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/type_path.rs
crates/bevy_reflect/src/type_path.rs
use core::fmt; /// A static accessor to type paths and names. /// /// The engine uses this trait over [`core::any::type_name`] for stability and flexibility. /// /// This trait is automatically implemented by the `#[derive(Reflect)]` macro /// and allows type path information to be processed without an instance of tha...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/lib.rs
crates/bevy_reflect/src/lib.rs
#![cfg_attr( any(docsrs, docsrs_dep), expect( internal_features, reason = "rustdoc_internals is needed for fake_variadic" ) )] #![cfg_attr(any(docsrs, docsrs_dep), feature(doc_cfg, rustdoc_internals))] #![doc( html_logo_url = "https://bevy.org/assets/icon.png", html_favicon_url = "ht...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/reflect.rs
crates/bevy_reflect/src/reflect.rs
use crate::{ array_debug, enum_debug, list_debug, map_debug, set_debug, struct_debug, tuple_debug, tuple_struct_debug, DynamicTypePath, DynamicTyped, OpaqueInfo, ReflectCloneError, ReflectKind, ReflectKindMismatchError, ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, Typed, }; use alloc::borrow::C...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/type_info_stack.rs
crates/bevy_reflect/src/type_info_stack.rs
use crate::TypeInfo; use alloc::vec::Vec; use core::{ fmt::{Debug, Formatter}, slice::Iter, }; /// Helper struct for managing a stack of [`TypeInfo`] instances. /// /// This is useful for tracking the type hierarchy when serializing and deserializing types. #[derive(Default, Clone)] pub(crate) struct TypeInfoS...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/list.rs
crates/bevy_reflect/src/list.rs
use alloc::{boxed::Box, vec::Vec}; use core::{ any::Any, fmt::{Debug, Formatter}, hash::{Hash, Hasher}, }; use bevy_reflect_derive::impl_type_path; use crate::generics::impl_generic_info_methods; use crate::{ type_info::impl_type_methods, utility::reflect_hasher, ApplyError, FromReflect, Generics, ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/remote.rs
crates/bevy_reflect/src/remote.rs
use crate::Reflect; /// Marks a type as a [reflectable] wrapper for a remote type. /// /// This allows types from external libraries (remote types) to be included in reflection. /// /// # Safety /// /// It is highly recommended to avoid implementing this trait manually and instead use the /// [`#[reflect_remote]`](cra...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/reflectable.rs
crates/bevy_reflect/src/reflectable.rs
use crate::{GetTypeRegistration, Reflect, TypePath, Typed}; /// A catch-all trait that is bound by the core reflection traits, /// useful to simplify reflection-based generic type bounds. /// /// You do _not_ need to implement this trait manually. /// It is automatically implemented for all types that implement its su...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/type_registry.rs
crates/bevy_reflect/src/type_registry.rs
use crate::{serde::Serializable, FromReflect, Reflect, TypeInfo, TypePath, Typed}; use alloc::{boxed::Box, string::String}; use bevy_platform::{ collections::{HashMap, HashSet}, sync::{Arc, PoisonError, RwLock, RwLockReadGuard, RwLockWriteGuard}, }; use bevy_ptr::{Ptr, PtrMut}; use bevy_utils::TypeIdMap; use co...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
true
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/fields.rs
crates/bevy_reflect/src/fields.rs
use crate::{ attributes::{impl_custom_attribute_methods, CustomAttributes}, type_info::impl_type_methods, MaybeTyped, PartialReflect, Type, TypeInfo, TypePath, }; use alloc::borrow::Cow; use bevy_platform::sync::Arc; use core::fmt::{Display, Formatter}; /// The named field of a reflected struct. #[derive(C...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/kind.rs
crates/bevy_reflect/src/kind.rs
use alloc::boxed::Box; use thiserror::Error; #[cfg(feature = "functions")] use crate::func::Function; use crate::{Array, Enum, List, Map, PartialReflect, Set, Struct, Tuple, TupleStruct}; /// An enumeration of the "kinds" of a reflected type. /// /// Each kind corresponds to a specific reflection trait, /// such as [...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/error.rs
crates/bevy_reflect/src/error.rs
use crate::FieldId; use alloc::{borrow::Cow, format}; use thiserror::Error; /// An error that occurs when cloning a type via [`PartialReflect::reflect_clone`]. /// /// [`PartialReflect::reflect_clone`]: crate::PartialReflect::reflect_clone #[derive(Clone, Debug, Error, PartialEq, Eq)] pub enum ReflectCloneError { ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/tuple_struct.rs
crates/bevy_reflect/src/tuple_struct.rs
use bevy_reflect_derive::impl_type_path; use crate::generics::impl_generic_info_methods; use crate::{ attributes::{impl_custom_attribute_methods, CustomAttributes}, type_info::impl_type_methods, ApplyError, DynamicTuple, Generics, PartialReflect, Reflect, ReflectKind, ReflectMut, ReflectOwned, ReflectR...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/type_info.rs
crates/bevy_reflect/src/type_info.rs
use crate::{ ArrayInfo, DynamicArray, DynamicEnum, DynamicList, DynamicMap, DynamicStruct, DynamicTuple, DynamicTupleStruct, EnumInfo, Generics, ListInfo, MapInfo, PartialReflect, Reflect, ReflectKind, SetInfo, StructInfo, TupleInfo, TupleStructInfo, TypePath, TypePathTable, }; use core::{ any::{Any, Ty...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/generics.rs
crates/bevy_reflect/src/generics.rs
use crate::type_info::impl_type_methods; use crate::{Reflect, Type, TypePath}; use alloc::{borrow::Cow, boxed::Box}; use bevy_platform::sync::Arc; use core::ops::Deref; use derive_more::derive::From; /// The generic parameters of a type. /// /// This is automatically generated via the [`Reflect` derive macro] /// and ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/map.rs
crates/bevy_reflect/src/map.rs
use core::fmt::{Debug, Formatter}; use bevy_platform::collections::HashTable; use bevy_reflect_derive::impl_type_path; use crate::{ generics::impl_generic_info_methods, type_info::impl_type_methods, ApplyError, Generics, MaybeTyped, PartialReflect, Reflect, ReflectKind, ReflectMut, ReflectOwned, ReflectRef, T...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/struct_trait.rs
crates/bevy_reflect/src/struct_trait.rs
use crate::generics::impl_generic_info_methods; use crate::{ attributes::{impl_custom_attribute_methods, CustomAttributes}, type_info::impl_type_methods, ApplyError, Generics, NamedField, PartialReflect, Reflect, ReflectKind, ReflectMut, ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; use alloc::...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/tuple.rs
crates/bevy_reflect/src/tuple.rs
use bevy_reflect_derive::impl_type_path; use variadics_please::all_tuples; use crate::generics::impl_generic_info_methods; use crate::{ type_info::impl_type_methods, utility::GenericTypePathCell, ApplyError, FromReflect, Generics, GetTypeRegistration, MaybeTyped, PartialReflect, Reflect, ReflectCloneError, Ref...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/from_reflect.rs
crates/bevy_reflect/src/from_reflect.rs
use crate::{FromType, PartialReflect, Reflect}; use alloc::boxed::Box; /// A trait that enables types to be dynamically constructed from reflected data. /// /// It's recommended to use the [derive macro] rather than manually implementing this trait. /// /// `FromReflect` allows dynamic proxy types, like [`DynamicStruc...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/utility.rs
crates/bevy_reflect/src/utility.rs
//! Helpers for working with Bevy reflection. use crate::TypeInfo; use alloc::boxed::Box; use bevy_platform::{ hash::{DefaultHasher, FixedHasher, NoOpHash}, sync::{OnceLock, PoisonError, RwLock}, }; use bevy_utils::TypeIdMap; use core::{ any::{Any, TypeId}, hash::BuildHasher, }; /// A type that can be...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/attributes.rs
crates/bevy_reflect/src/attributes.rs
//! Types and functions for creating, manipulating and querying [`CustomAttributes`]. use crate::Reflect; use alloc::boxed::Box; use bevy_utils::TypeIdMap; use core::{ any::TypeId, fmt::{Debug, Formatter}, }; /// A collection of custom attributes for a type, field, or variant. /// /// These attributes can be ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/is.rs
crates/bevy_reflect/src/is.rs
use core::any::{Any, TypeId}; /// Checks if the current type "is" another type, using a [`TypeId`] equality comparison. pub trait Is { /// Checks if the current type "is" another type, using a [`TypeId`] equality comparison. /// This is most useful in the context of generic logic. /// /// ``` /// #...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/set.rs
crates/bevy_reflect/src/set.rs
use alloc::{boxed::Box, format, vec::Vec}; use core::fmt::{Debug, Formatter}; use bevy_platform::collections::{hash_table::OccupiedEntry as HashTableOccupiedEntry, HashTable}; use bevy_reflect_derive::impl_type_path; use crate::{ generics::impl_generic_info_methods, hash_error, type_info::impl_type_methods, Apply...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/signature.rs
crates/bevy_reflect/src/func/signature.rs
//! Function signature types. //! //! Function signatures differ from [`FunctionInfo`] and [`SignatureInfo`] in that they //! are only concerned about the types and order of the arguments and return type of a function. //! //! The names of arguments do not matter, //! nor does any other information about the function s...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/into_function_mut.rs
crates/bevy_reflect/src/func/into_function_mut.rs
use crate::func::{DynamicFunctionMut, ReflectFnMut, TypedFunction}; /// A trait for types that can be converted into a [`DynamicFunctionMut`]. /// /// This trait is automatically implemented for any type that implements /// [`ReflectFnMut`] and [`TypedFunction`]. /// /// This trait can be seen as a superset of [`IntoF...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/dynamic_function.rs
crates/bevy_reflect/src/func/dynamic_function.rs
use crate::{ __macro_exports::RegisterForReflection, func::{ args::{ArgCount, ArgList}, dynamic_function_internal::DynamicFunctionInternal, info::FunctionInfo, DynamicFunctionMut, Function, FunctionOverloadError, FunctionResult, IntoFunction, IntoFunctionMut, }, A...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/info.rs
crates/bevy_reflect/src/func/info.rs
use alloc::{borrow::Cow, boxed::Box, vec, vec::Vec}; use core::fmt::{Debug, Formatter}; use crate::{ func::args::{ArgCount, ArgCountOutOfBoundsError, ArgInfo, GetOwnership, Ownership}, func::signature::ArgumentSignature, func::FunctionOverloadError, type_info::impl_type_methods, Type, TypePath, }; ...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/function.rs
crates/bevy_reflect/src/func/function.rs
use crate::{ func::{ args::{ArgCount, ArgList}, DynamicFunction, FunctionInfo, FunctionResult, }, PartialReflect, }; use alloc::borrow::Cow; use core::fmt::Debug; /// A trait used to power [function-like] operations via [reflection]. /// /// This trait allows types to be called like regular...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/error.rs
crates/bevy_reflect/src/func/error.rs
use crate::func::signature::ArgumentSignature; use crate::func::{ args::{ArgCount, ArgError}, Return, }; use alloc::borrow::Cow; use bevy_platform::collections::HashSet; use thiserror::Error; /// An error that occurs when calling a [`DynamicFunction`] or [`DynamicFunctionMut`]. /// /// [`DynamicFunction`]: cra...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/macros.rs
crates/bevy_reflect/src/func/macros.rs
/// Helper macro to implement the necessary traits for function reflection. /// /// This macro calls the following macros: /// - [`impl_get_ownership`](crate::func::args::impl_get_ownership) /// - [`impl_from_arg`](crate::func::args::impl_from_arg) /// - [`impl_into_return`](crate::func::impl_into_return) /// /// # Syn...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/registry.rs
crates/bevy_reflect/src/func/registry.rs
use alloc::borrow::Cow; use bevy_platform::{ collections::HashMap, sync::{Arc, PoisonError, RwLock, RwLockReadGuard, RwLockWriteGuard}, }; use core::fmt::Debug; use crate::func::{ ArgList, DynamicFunction, FunctionRegistrationError, FunctionResult, IntoFunction, }; /// A registry of [reflected functions]....
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false
bevyengine/bevy
https://github.com/bevyengine/bevy/blob/51a6fedb06a022ab5d39e099413caa882e1b022d/crates/bevy_reflect/src/func/mod.rs
crates/bevy_reflect/src/func/mod.rs
//! Reflection-based dynamic functions. //! //! This module provides a way to pass around and call functions dynamically //! using the [`DynamicFunction`] and [`DynamicFunctionMut`] types. //! //! Many simple functions and closures can be automatically converted to these types //! using the [`IntoFunction`] and [`IntoF...
rust
Apache-2.0
51a6fedb06a022ab5d39e099413caa882e1b022d
2026-01-04T15:31:59.438636Z
false