pub type GoudResult<T> = Result<T, GoudError>;Expand description
A specialized Result type for GoudEngine operations.
This type alias provides a convenient way to work with results that may
contain a GoudError. It’s the standard return type for fallible operations
throughout the engine.
§Example
use goud_engine::core::error::{GoudResult, GoudError};
fn load_texture(path: &str) -> GoudResult<u32> {
if path.is_empty() {
return Err(GoudError::ResourceNotFound("Empty path".to_string()));
}
Ok(42) // texture id
}
match load_texture("player.png") {
Ok(id) => println!("Loaded texture with id: {}", id),
Err(e) => println!("Failed to load: {}", e),
}Aliased Type§
pub enum GoudResult<T> {
Ok(T),
Err(GoudError),
}