Add a few missing doc comments in bevy_image (#19493)

# Objective

Another tiny step towards
https://github.com/bevyengine/bevy/issues/3492.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
theotherphil 2025-06-04 22:12:02 +01:00 committed by GitHub
parent 476d79d821
commit d0f1b3e9f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -5,8 +5,11 @@ use guillotiere::{size2, Allocation, AtlasAllocator};
use thiserror::Error;
use tracing::error;
/// An error produced by [`DynamicTextureAtlasBuilder`] when trying to add a new
/// texture to a [`TextureAtlasLayout`].
#[derive(Debug, Error)]
pub enum DynamicTextureAtlasBuilderError {
/// Unable to allocate space within the atlas for the new texture
#[error("Couldn't allocate space to add the image requested")]
FailedToAllocateSpace,
/// Attempted to add a texture to an uninitialized atlas

View File

@ -22,7 +22,10 @@ use wgpu_types::{
TextureViewDescriptor,
};
/// Trait used to provide default values for Bevy-external types that
/// do not implement [`Default`].
pub trait BevyDefault {
/// Returns the default value for a type.
fn bevy_default() -> Self;
}