pub struct GoudGame { /* private fields */ }Expand description
The main game instance managing the ECS world and game loop.
§Example
use goud_engine::sdk::{GoudGame, GameConfig};
use goud_engine::sdk::components::Transform2D;
use goud_engine::core::math::Vec2;
let mut game = GoudGame::new(GameConfig::default()).unwrap();
let player = game.spawn()
.with(Transform2D::from_position(Vec2::new(400.0, 300.0)))
.build();Implementations§
Source§impl GoudGame
impl GoudGame
Sourcepub fn ffi_entity_spawn_empty(&mut self) -> u64
pub fn ffi_entity_spawn_empty(&mut self) -> u64
Spawns a new empty entity with no components.
Returns the entity as a u64 bit representation for FFI compatibility.
Sourcepub unsafe fn ffi_entity_spawn_batch(
&mut self,
count: u32,
out_entities: *mut u64,
) -> u32
pub unsafe fn ffi_entity_spawn_batch( &mut self, count: u32, out_entities: *mut u64, ) -> u32
Spawns multiple empty entities in a batch and writes their IDs to the provided output buffer.
Returns the number of entities spawned.
§Safety
out_entities must point to valid memory with capacity for at
least count u64 values.
Sourcepub fn ffi_entity_despawn(&mut self, entity_id: u64) -> bool
pub fn ffi_entity_despawn(&mut self, entity_id: u64) -> bool
Despawns an entity and all its components from the world.
Returns true if the entity was despawned, false otherwise.
Sourcepub unsafe fn ffi_entity_despawn_batch(
&mut self,
entity_ids: *const u64,
count: u32,
) -> u32
pub unsafe fn ffi_entity_despawn_batch( &mut self, entity_ids: *const u64, count: u32, ) -> u32
Despawns multiple entities in a batch.
Returns the number of entities successfully despawned.
§Safety
entity_ids must point to valid memory with at least count u64
values.
Sourcepub fn ffi_entity_is_alive(&self, entity_id: u64) -> bool
pub fn ffi_entity_is_alive(&self, entity_id: u64) -> bool
Checks if an entity is currently alive in the world.
Sourcepub fn ffi_entity_count(&self) -> u32
pub fn ffi_entity_count(&self) -> u32
Returns the total number of alive entities in the world.
Sourcepub unsafe fn ffi_entity_is_alive_batch(
&self,
entity_ids: *const u64,
count: u32,
out_results: *mut u8,
) -> u32
pub unsafe fn ffi_entity_is_alive_batch( &self, entity_ids: *const u64, count: u32, out_results: *mut u8, ) -> u32
Checks if multiple entities are alive in the world.
Results are written to out_results where 1 = alive, 0 = dead.
Returns the number of results written.
§Safety
entity_idsmust point to valid memory with at leastcountu64 values.out_resultsmust point to valid memory with at leastcountu8 values.
Source§impl GoudGame
impl GoudGame
Sourcepub fn new(config: GameConfig) -> Result<GoudGame, GoudError>
pub fn new(config: GameConfig) -> Result<GoudGame, GoudError>
Creates a new game instance with the given configuration.
This creates a headless game instance suitable for testing and
non-graphical use. For a windowed game with rendering, use
with_platform instead.
Sourcepub fn default_game() -> Result<GoudGame, GoudError>
pub fn default_game() -> Result<GoudGame, GoudError>
Creates a game with default configuration.
Sourcepub fn with_platform(config: GameConfig) -> Result<GoudGame, GoudError>
pub fn with_platform(config: GameConfig) -> Result<GoudGame, GoudError>
Creates a windowed game instance with a GLFW platform backend.
This initializes a GLFW window with an OpenGL 3.3 Core context, sets up the sprite batch renderer, and prepares the asset server.
§Errors
Returns an error if GLFW initialization or window creation fails.
Sourcepub fn world_mut(&mut self) -> &mut World
pub fn world_mut(&mut self) -> &mut World
Returns a mutable reference to the default scene’s ECS world.
Sourcepub fn spawn(&mut self) -> EntityBuilder<'_>
pub fn spawn(&mut self) -> EntityBuilder<'_>
Creates an entity builder for fluent entity creation (default scene).
Sourcepub fn spawn_empty(&mut self) -> Entity
pub fn spawn_empty(&mut self) -> Entity
Spawns an empty entity with no components (default scene).
Sourcepub fn spawn_batch(&mut self, count: usize) -> Vec<Entity>
pub fn spawn_batch(&mut self, count: usize) -> Vec<Entity>
Spawns multiple empty entities at once (default scene).
Sourcepub fn despawn(&mut self, entity: Entity) -> bool
pub fn despawn(&mut self, entity: Entity) -> bool
Despawns an entity and removes all its components (default scene).
Sourcepub fn get<T>(&self, entity: Entity) -> Option<&T>where
T: Component,
pub fn get<T>(&self, entity: Entity) -> Option<&T>where
T: Component,
Gets a reference to a component on an entity (default scene).
Sourcepub fn get_mut<T>(&mut self, entity: Entity) -> Option<&mut T>where
T: Component,
pub fn get_mut<T>(&mut self, entity: Entity) -> Option<&mut T>where
T: Component,
Gets a mutable reference to a component on an entity (default scene).
Sourcepub fn insert<T>(&mut self, entity: Entity, component: T)where
T: Component,
pub fn insert<T>(&mut self, entity: Entity, component: T)where
T: Component,
Adds or replaces a component on an entity (default scene).
Sourcepub fn remove<T>(&mut self, entity: Entity) -> Option<T>where
T: Component,
pub fn remove<T>(&mut self, entity: Entity) -> Option<T>where
T: Component,
Removes a component from an entity (default scene).
Sourcepub fn has<T>(&self, entity: Entity) -> boolwhere
T: Component,
pub fn has<T>(&self, entity: Entity) -> boolwhere
T: Component,
Checks if an entity has a specific component (default scene).
Sourcepub fn entity_count(&self) -> usize
pub fn entity_count(&self) -> usize
Returns the number of entities in the default scene.
Sourcepub fn create_scene(&mut self, name: &str) -> Result<u32, GoudError>
pub fn create_scene(&mut self, name: &str) -> Result<u32, GoudError>
Creates a new scene with the given name.
Sourcepub fn destroy_scene(&mut self, id: u32) -> Result<(), GoudError>
pub fn destroy_scene(&mut self, id: u32) -> Result<(), GoudError>
Destroys a scene. Cannot destroy the default scene.
Sourcepub fn scene_mut(&mut self, id: u32) -> Option<&mut World>
pub fn scene_mut(&mut self, id: u32) -> Option<&mut World>
Returns a mutable reference to a scene’s world.
Sourcepub fn scene_by_name(&self, name: &str) -> Option<u32>
pub fn scene_by_name(&self, name: &str) -> Option<u32>
Looks up a scene by name.
Sourcepub fn set_scene_active(
&mut self,
id: u32,
active: bool,
) -> Result<(), GoudError>
pub fn set_scene_active( &mut self, id: u32, active: bool, ) -> Result<(), GoudError>
Sets whether a scene is active.
Sourcepub fn scene_manager(&self) -> &SceneManager
pub fn scene_manager(&self) -> &SceneManager
Returns a reference to the scene manager.
Sourcepub fn scene_manager_mut(&mut self) -> &mut SceneManager
pub fn scene_manager_mut(&mut self) -> &mut SceneManager
Returns a mutable reference to the scene manager.
Sourcepub fn config(&self) -> &GameConfig
pub fn config(&self) -> &GameConfig
Returns the game configuration.
Sourcepub fn window_size(&self) -> (u32, u32)
pub fn window_size(&self) -> (u32, u32)
Returns the window dimensions.
Sourcepub fn run<F>(&mut self, update: F)
pub fn run<F>(&mut self, update: F)
Runs the game loop with the given update callback.
The callback receives the default scene’s world for backward
compatibility. Use scene_manager_mut
inside the callback for multi-scene access.
Sourcepub fn update_frame<F>(&mut self, delta_time: f32, update: F)
pub fn update_frame<F>(&mut self, delta_time: f32, update: F)
Runs a single frame update for all active scenes.
Sourcepub fn set_fps_overlay_enabled(&mut self, enabled: bool)
pub fn set_fps_overlay_enabled(&mut self, enabled: bool)
Enables or disables the FPS stats overlay.
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Returns the current frame count.
Sourcepub fn total_time(&self) -> f32
pub fn total_time(&self) -> f32
Returns the total time elapsed since game start.
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Returns true if the game has been initialized.
Sourcepub fn from_engine_config(config: EngineConfig) -> Result<GoudGame, GoudError>
pub fn from_engine_config(config: EngineConfig) -> Result<GoudGame, GoudError>
Creates a headless game from an EngineConfig builder.
Sourcepub fn from_engine_config_with_platform(
config: EngineConfig,
) -> Result<GoudGame, GoudError>
pub fn from_engine_config_with_platform( config: EngineConfig, ) -> Result<GoudGame, GoudError>
Creates a windowed game from an EngineConfig builder.
Sourcepub fn providers(&self) -> &ProviderRegistry
pub fn providers(&self) -> &ProviderRegistry
Returns a reference to the provider registry.
Source§impl GoudGame
impl GoudGame
Sourcepub fn is_key_pressed(&self, key: Key) -> bool
pub fn is_key_pressed(&self, key: Key) -> bool
Sourcepub fn is_key_just_pressed(&self, key: Key) -> bool
pub fn is_key_just_pressed(&self, key: Key) -> bool
Returns true if the given key was pressed this frame (not held from previous frame).
Use this for one-shot actions like jumping or menu selection.
Sourcepub fn is_key_just_released(&self, key: Key) -> bool
pub fn is_key_just_released(&self, key: Key) -> bool
Returns true if the given key was released this frame.
Returns true if the given mouse button is currently held down.
Returns true if the given mouse button was pressed this frame.
Returns true if the given mouse button was released this frame.
Sourcepub fn mouse_position(&self) -> (f32, f32)
pub fn mouse_position(&self) -> (f32, f32)
Returns the current mouse position in window coordinates.
Returns (x, y) where (0, 0) is the top-left corner.
Sourcepub fn mouse_delta(&self) -> (f32, f32)
pub fn mouse_delta(&self) -> (f32, f32)
Returns the mouse movement delta since the last frame.
Returns (dx, dy) where positive X is right and positive Y is down.
Sourcepub fn scroll_delta(&self) -> (f32, f32)
pub fn scroll_delta(&self) -> (f32, f32)
Returns the scroll wheel delta since the last frame.
Returns (horizontal, vertical) scroll amounts.
Sourcepub fn map_action_key(&mut self, action: &str, key: Key)
pub fn map_action_key(&mut self, action: &str, key: Key)
Maps a mouse button to a named action.
Sourcepub fn is_action_pressed(&self, action: &str) -> bool
pub fn is_action_pressed(&self, action: &str) -> bool
Returns true if any binding for the named action is currently held.
Sourcepub fn is_action_just_pressed(&self, action: &str) -> bool
pub fn is_action_just_pressed(&self, action: &str) -> bool
Returns true if any binding for the named action was pressed this frame.
Sourcepub fn is_action_just_released(&self, action: &str) -> bool
pub fn is_action_just_released(&self, action: &str) -> bool
Returns true if any binding for the named action was released this frame.
Sourcepub fn input(&self) -> &InputManager
pub fn input(&self) -> &InputManager
Returns a reference to the underlying InputManager.
Use this for advanced input queries (gamepad, input buffering, etc.) that are not exposed through convenience methods.
Sourcepub fn input_mut(&mut self) -> &mut InputManager
pub fn input_mut(&mut self) -> &mut InputManager
Returns a mutable reference to the underlying InputManager.
Use this for advanced configuration (deadzone, buffer duration, etc.).
Source§impl GoudGame
impl GoudGame
Sourcepub fn begin_2d_render(&mut self) -> Result<(), GoudError>
pub fn begin_2d_render(&mut self) -> Result<(), GoudError>
Begins a 2D rendering pass.
Call this before drawing sprites. Must be paired with
end_2d_render.
Sourcepub fn end_2d_render(&mut self) -> Result<(), GoudError>
pub fn end_2d_render(&mut self) -> Result<(), GoudError>
Ends the 2D rendering pass and submits batched draw calls to the GPU.
Sourcepub fn draw_sprites(&mut self) -> Result<(), GoudError>
pub fn draw_sprites(&mut self) -> Result<(), GoudError>
Draws all entities with Sprite + Transform2D components.
Sourcepub fn render_2d_stats(&self) -> (usize, usize, f32)
pub fn render_2d_stats(&self) -> (usize, usize, f32)
Returns 2D rendering statistics: (sprite_count, batch_count, batch_ratio).
Sourcepub fn has_2d_renderer(&self) -> bool
pub fn has_2d_renderer(&self) -> bool
Returns true if a 2D renderer (SpriteBatch) is initialized.
Source§impl GoudGame
impl GoudGame
Sourcepub fn begin_render(&mut self) -> bool
pub fn begin_render(&mut self) -> bool
Begins a new rendering frame. Call before any drawing operations.
Sourcepub fn end_render(&mut self) -> bool
pub fn end_render(&mut self) -> bool
Ends the current rendering frame.
Sourcepub fn set_viewport(&mut self, x: i32, y: i32, width: u32, height: u32)
pub fn set_viewport(&mut self, x: i32, y: i32, width: u32, height: u32)
Sets the viewport rectangle for rendering.
Sourcepub fn enable_blending(&mut self)
pub fn enable_blending(&mut self)
Enables alpha blending for transparent sprites.
Sourcepub fn disable_blending(&mut self)
pub fn disable_blending(&mut self)
Disables alpha blending.
Sourcepub fn enable_depth_test(&mut self)
pub fn enable_depth_test(&mut self)
Enables depth testing.
Sourcepub fn disable_depth_test(&mut self)
pub fn disable_depth_test(&mut self)
Disables depth testing.
Sourcepub fn clear_depth(&mut self)
pub fn clear_depth(&mut self)
Clears the depth buffer.
Sourcepub fn draw_sprite(
&mut self,
texture: u64,
x: f32,
y: f32,
width: f32,
height: f32,
rotation: f32,
r: f32,
g: f32,
b: f32,
a: f32,
) -> bool
pub fn draw_sprite( &mut self, texture: u64, x: f32, y: f32, width: f32, height: f32, rotation: f32, r: f32, g: f32, b: f32, a: f32, ) -> bool
Draws a textured sprite at the given position (immediate mode).
Sourcepub fn draw_sprite_rect(
&mut self,
texture: u64,
x: f32,
y: f32,
width: f32,
height: f32,
rotation: f32,
src_x: f32,
src_y: f32,
src_w: f32,
src_h: f32,
r: f32,
g: f32,
b: f32,
a: f32,
) -> bool
pub fn draw_sprite_rect( &mut self, texture: u64, x: f32, y: f32, width: f32, height: f32, rotation: f32, src_x: f32, src_y: f32, src_w: f32, src_h: f32, r: f32, g: f32, b: f32, a: f32, ) -> bool
Draws a textured sprite with a source rectangle for sprite sheet animation.
Sourcepub fn draw_quad(
&mut self,
x: f32,
y: f32,
width: f32,
height: f32,
r: f32,
g: f32,
b: f32,
a: f32,
) -> bool
pub fn draw_quad( &mut self, x: f32, y: f32, width: f32, height: f32, r: f32, g: f32, b: f32, a: f32, ) -> bool
Draws a colored quad (no texture) at the given position.
Sourcepub unsafe fn get_render_stats(&self, out_stats: *mut GoudRenderStats) -> bool
pub unsafe fn get_render_stats(&self, out_stats: *mut GoudRenderStats) -> bool
Gets rendering statistics for the current frame.
Writes default statistics to the provided out-pointer.
Returns true on success, false if the pointer is null.
§Safety
out_stats must be a valid, aligned, writable pointer to a
GoudRenderStats value, or null (in which case this returns false).
Source§impl GoudGame
impl GoudGame
Sourcepub fn create_primitive(&mut self, info: PrimitiveCreateInfo) -> u32
pub fn create_primitive(&mut self, info: PrimitiveCreateInfo) -> u32
Creates a 3D primitive and returns its object ID.
Sourcepub fn create_cube(
&mut self,
texture_id: u32,
width: f32,
height: f32,
depth: f32,
) -> u32
pub fn create_cube( &mut self, texture_id: u32, width: f32, height: f32, depth: f32, ) -> u32
Creates a 3D cube and returns its object ID.
Sourcepub fn create_plane(&mut self, texture_id: u32, width: f32, depth: f32) -> u32
pub fn create_plane(&mut self, texture_id: u32, width: f32, depth: f32) -> u32
Creates a 3D plane and returns its object ID.
Sourcepub fn create_sphere(
&mut self,
texture_id: u32,
diameter: f32,
segments: u32,
) -> u32
pub fn create_sphere( &mut self, texture_id: u32, diameter: f32, segments: u32, ) -> u32
Creates a 3D sphere and returns its object ID.
Sourcepub fn create_cylinder(
&mut self,
texture_id: u32,
radius: f32,
height: f32,
segments: u32,
) -> u32
pub fn create_cylinder( &mut self, texture_id: u32, radius: f32, height: f32, segments: u32, ) -> u32
Creates a 3D cylinder and returns its object ID.
Sourcepub fn set_object_position(&mut self, id: u32, x: f32, y: f32, z: f32) -> bool
pub fn set_object_position(&mut self, id: u32, x: f32, y: f32, z: f32) -> bool
Sets the position of a 3D object.
Sourcepub fn set_object_rotation(&mut self, id: u32, x: f32, y: f32, z: f32) -> bool
pub fn set_object_rotation(&mut self, id: u32, x: f32, y: f32, z: f32) -> bool
Sets the rotation of a 3D object (Euler angles in degrees).
Sourcepub fn set_object_scale(&mut self, id: u32, x: f32, y: f32, z: f32) -> bool
pub fn set_object_scale(&mut self, id: u32, x: f32, y: f32, z: f32) -> bool
Sets the scale of a 3D object.
Sourcepub fn destroy_object(&mut self, object_id: u32) -> bool
pub fn destroy_object(&mut self, object_id: u32) -> bool
Removes a 3D object from the scene.
Sourcepub fn add_light(
&mut self,
light_type: i32,
pos_x: f32,
pos_y: f32,
pos_z: f32,
dir_x: f32,
dir_y: f32,
dir_z: f32,
r: f32,
g: f32,
b: f32,
intensity: f32,
range: f32,
spot_angle: f32,
) -> u32
pub fn add_light( &mut self, light_type: i32, pos_x: f32, pos_y: f32, pos_z: f32, dir_x: f32, dir_y: f32, dir_z: f32, r: f32, g: f32, b: f32, intensity: f32, range: f32, spot_angle: f32, ) -> u32
Adds a light to the 3D scene with flattened parameters.
Sourcepub fn update_light(
&mut self,
light_id: u32,
light_type: i32,
pos_x: f32,
pos_y: f32,
pos_z: f32,
dir_x: f32,
dir_y: f32,
dir_z: f32,
r: f32,
g: f32,
b: f32,
intensity: f32,
range: f32,
spot_angle: f32,
) -> bool
pub fn update_light( &mut self, light_id: u32, light_type: i32, pos_x: f32, pos_y: f32, pos_z: f32, dir_x: f32, dir_y: f32, dir_z: f32, r: f32, g: f32, b: f32, intensity: f32, range: f32, spot_angle: f32, ) -> bool
Updates a light’s properties.
Sourcepub fn remove_light(&mut self, light_id: u32) -> bool
pub fn remove_light(&mut self, light_id: u32) -> bool
Removes a light from the 3D scene.
Sourcepub fn set_camera_position(&mut self, x: f32, y: f32, z: f32) -> bool
pub fn set_camera_position(&mut self, x: f32, y: f32, z: f32) -> bool
Sets the 3D camera position.
Sourcepub fn set_camera_rotation(&mut self, pitch: f32, yaw: f32, roll: f32) -> bool
pub fn set_camera_rotation(&mut self, pitch: f32, yaw: f32, roll: f32) -> bool
Sets the 3D camera rotation (pitch, yaw, roll in degrees).
Sourcepub fn configure_grid(
&mut self,
enabled: bool,
size: f32,
divisions: u32,
) -> bool
pub fn configure_grid( &mut self, enabled: bool, size: f32, divisions: u32, ) -> bool
Configures the ground grid.
Sourcepub fn set_grid_enabled(&mut self, enabled: bool) -> bool
pub fn set_grid_enabled(&mut self, enabled: bool) -> bool
Sets grid enabled state.
Sourcepub fn configure_skybox(
&mut self,
enabled: bool,
r: f32,
g: f32,
b: f32,
a: f32,
) -> bool
pub fn configure_skybox( &mut self, enabled: bool, r: f32, g: f32, b: f32, a: f32, ) -> bool
Configures the skybox/background color.
Sourcepub fn configure_fog(
&mut self,
enabled: bool,
r: f32,
g: f32,
b: f32,
density: f32,
) -> bool
pub fn configure_fog( &mut self, enabled: bool, r: f32, g: f32, b: f32, density: f32, ) -> bool
Configures fog settings.
Sourcepub fn set_fog_enabled(&mut self, enabled: bool) -> bool
pub fn set_fog_enabled(&mut self, enabled: bool) -> bool
Sets fog enabled state.
Sourcepub fn render_all(&mut self) -> bool
pub fn render_all(&mut self) -> bool
Renders all 3D objects (alias for render).
Sourcepub fn has_3d_renderer(&self) -> bool
pub fn has_3d_renderer(&self) -> bool
Returns true if a 3D renderer is initialized.
Source§impl GoudGame
impl GoudGame
Sourcepub fn should_close(&self) -> bool
pub fn should_close(&self) -> bool
Returns true if the window has been requested to close.
This checks whether the user clicked the close button, pressed Alt+F4,
or called set_should_close.
Returns false if no platform backend is initialized (headless mode).
Sourcepub fn set_should_close(&mut self, should_close: bool) -> Result<(), GoudError>
pub fn set_should_close(&mut self, should_close: bool) -> Result<(), GoudError>
Signals the window to close (or not) after the current frame.
§Errors
Returns an error if no platform backend is initialized.
Sourcepub fn poll_events(&mut self) -> Result<f32, GoudError>
pub fn poll_events(&mut self) -> Result<f32, GoudError>
Polls platform events and advances input state for the new frame.
This processes all pending window/input events, syncs the OpenGL viewport on window resize, and returns the delta time (seconds since last call). Must be called once per frame before querying input.
§Errors
Returns an error if no platform backend is initialized.
Sourcepub fn swap_buffers(&mut self) -> Result<(), GoudError>
pub fn swap_buffers(&mut self) -> Result<(), GoudError>
Presents the rendered frame by swapping front and back buffers.
Call this at the end of each frame after all rendering is complete.
§Errors
Returns an error if no platform backend is initialized.
Sourcepub fn clear(&mut self, r: f32, g: f32, b: f32, a: f32)
pub fn clear(&mut self, r: f32, g: f32, b: f32, a: f32)
Clears the window with the specified color.
Sets the clear color and clears the color buffer using the render backend.
Sourcepub fn get_window_size(&self) -> (u32, u32)
pub fn get_window_size(&self) -> (u32, u32)
Returns the physical window size (width, height) in pixels.
If no platform backend is initialized, returns the configured size
from GameConfig.
Sourcepub fn has_platform(&self) -> bool
pub fn has_platform(&self) -> bool
Returns true if a platform backend is initialized.
When false, window/rendering methods will return errors or
fall back to headless behavior.
Sourcepub fn get_delta_time(&self) -> f32
pub fn get_delta_time(&self) -> f32
Returns the delta time (seconds since last poll_events call).
This reads from the internal GameContext which is updated by
poll_events. Returns 0.0 before the first
poll.
Sourcepub fn get_framebuffer_size(&self) -> (u32, u32)
pub fn get_framebuffer_size(&self) -> (u32, u32)
Returns the physical framebuffer size (width, height) in pixels.
On HiDPI/Retina displays, this may differ from the logical window
size returned by get_window_size.
Renderers should use this for gl::Viewport.
If no platform backend is initialized, returns the configured size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GoudGame
impl !RefUnwindSafe for GoudGame
impl !Send for GoudGame
impl !Sync for GoudGame
impl Unpin for GoudGame
impl UnsafeUnpin for GoudGame
impl !UnwindSafe for GoudGame
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().