SYMBOL INDEX (255 symbols across 7 files) FILE: src/browser.rs function window (line 27) | pub fn window() -> Result { function document (line 31) | pub fn document() -> Result { function canvas (line 37) | pub fn canvas() -> Result { function context (line 45) | pub fn context() -> Result { function spawn_local (line 59) | pub fn spawn_local(future: F) function fetch_with_str (line 66) | pub async fn fetch_with_str(resource: &str) -> Result { function fetch_response (line 72) | pub async fn fetch_response(resource: &str) -> Result { function fetch_json (line 79) | pub async fn fetch_json(json_path: &str) -> Result { function fetch_array_buffer (line 90) | pub async fn fetch_array_buffer(resource: &str) -> Result { function new_image (line 103) | pub fn new_image() -> Result { type LoopClosure (line 107) | pub type LoopClosure = Closure; function create_raf_closure (line 108) | pub fn create_raf_closure(f: impl FnMut(f64) + 'static) -> LoopClosure { function request_animation_frame (line 112) | pub fn request_animation_frame(callback: &LoopClosure) -> Result { function closure_once (line 118) | pub fn closure_once(fn_once: F) -> Closure function closure_wrap (line 125) | pub fn closure_wrap(data: Box) -> Closure { function now (line 129) | pub fn now() -> Result { function draw_ui (line 136) | pub fn draw_ui(html: &str) -> Result<()> { function hide_ui (line 142) | pub fn hide_ui() -> Result<()> { function find_ui (line 159) | fn find_ui() -> Result { function find_html_element_by_id (line 166) | pub fn find_html_element_by_id(id: &str) -> Result { function test_error_loading_json (line 187) | async fn test_error_loading_json() { FILE: src/engine.rs type SheetRect (line 17) | pub struct SheetRect { type Cell (line 26) | pub struct Cell { type Sheet (line 32) | pub struct Sheet { type Point (line 37) | pub struct Point { type Rect (line 43) | pub struct Rect { method new (line 50) | pub const fn new(position: Point, width: i16, height: i16) -> Self { method new_from_x_y (line 58) | pub const fn new_from_x_y(x: i16, y: i16, width: i16, height: i16) -> ... method intersects (line 62) | pub fn intersects(&self, rect: &Rect) -> bool { method right (line 69) | pub fn right(&self) -> i16 { method bottom (line 73) | pub fn bottom(&self) -> i16 { method set_x (line 77) | pub fn set_x(&mut self, x: i16) { method x (line 81) | pub fn x(&self) -> i16 { method y (line 85) | pub fn y(&self) -> i16 { type Renderer (line 90) | pub struct Renderer { method clear (line 95) | pub fn clear(&self, rect: &Rect) { method draw_image (line 104) | pub fn draw_image(&self, image: &HtmlImageElement, frame: &Rect, desti... method draw_entire_image (line 120) | pub fn draw_entire_image(&self, image: &HtmlImageElement, position: &P... method draw_rect (line 127) | pub fn draw_rect(&self, bounding_box: &Rect) { method draw_text (line 140) | pub fn draw_text(&self, text: &str, location: &Point) -> Result<()> { function load_image (line 149) | pub async fn load_image(source: &str) -> Result { type Game (line 181) | pub trait Game { method initialize (line 182) | async fn initialize(&self) -> Result>; method update (line 183) | fn update(&mut self, keystate: &KeyState); method draw (line 184) | fn draw(&self, renderer: &Renderer); constant FRAME_SIZE (line 188) | const FRAME_SIZE: f32 = 1.0 / 60.0 * 1000.0; type GameLoop (line 189) | pub struct GameLoop { method start (line 196) | pub async fn start(game: impl Game) -> Result<()> { type SharedLoopClosure (line 193) | type SharedLoopClosure = Rc>>; function draw_frame_rate (line 244) | unsafe fn draw_frame_rate(renderer: &Renderer, frame_time: f64) { type KeyState (line 267) | pub struct KeyState { method new (line 272) | fn new() -> Self { method is_pressed (line 278) | pub fn is_pressed(&self, code: &str) -> bool { method set_pressed (line 282) | fn set_pressed(&mut self, code: &str, event: web_sys::KeyboardEvent) { method set_released (line 286) | fn set_released(&mut self, code: &str) { type KeyPress (line 291) | enum KeyPress { function process_input (line 296) | fn process_input(state: &mut KeyState, keyevent_receiver: &mut Unbounded... function prepare_input (line 309) | fn prepare_input() -> Result> { function add_click_handler (line 339) | pub fn add_click_handler(elem: HtmlElement) -> UnboundedReceiver<()> { type Image (line 353) | pub struct Image { method new (line 359) | pub fn new(element: HtmlImageElement, position: Point) -> Self { method draw (line 368) | pub fn draw(&self, renderer: &Renderer) { method bounding_box (line 372) | pub fn bounding_box(&self) -> &Rect { method move_horizontally (line 376) | pub fn move_horizontally(&mut self, distance: i16) { method set_x (line 380) | pub fn set_x(&mut self, x: i16) { method right (line 384) | pub fn right(&self) -> i16 { type SpriteSheet (line 389) | pub struct SpriteSheet { method new (line 395) | pub fn new(sheet: Sheet, image: HtmlImageElement) -> Self { method cell (line 399) | pub fn cell(&self, name: &str) -> Option<&Cell> { method draw (line 403) | pub fn draw(&self, renderer: &Renderer, source: &Rect, destination: &R... type Audio (line 409) | pub struct Audio { method new (line 419) | pub fn new() -> Result { method load_sound (line 425) | pub async fn load_sound(&self, filename: &str) -> Result { method play_sound (line 435) | pub fn play_sound(&self, sound: &Sound) -> Result<()> { method play_looping_sound (line 439) | pub fn play_looping_sound(&self, sound: &Sound) -> Result<()> { type Sound (line 414) | pub struct Sound { function two_rects_that_intersect_on_the_left (line 449) | fn two_rects_that_intersect_on_the_left() { FILE: src/game.rs constant HEIGHT (line 18) | const HEIGHT: i16 = 600; constant TIMELINE_MINIMUM (line 19) | const TIMELINE_MINIMUM: i16 = 1000; constant OBSTACLE_BUFFER (line 20) | const OBSTACLE_BUFFER: i16 = 20; type WalkTheDog (line 22) | pub struct WalkTheDog { method new (line 27) | pub fn new() -> Self { type WalkTheDogStateMachine (line 32) | enum WalkTheDogStateMachine { method new (line 39) | fn new(walk: Walk) -> Self { method update (line 43) | fn update(self, keystate: &KeyState) -> Self { method draw (line 51) | fn draw(&self, renderer: &Renderer) { method from (line 111) | fn from(state: ReadyEndState) -> Self { method from (line 189) | fn from(state: WalkingEndState) -> Self { method from (line 228) | fn from(state: GameOverEndState) -> Self { method from (line 243) | fn from(state: WalkTheDogState) -> Self { method from (line 249) | fn from(state: WalkTheDogState) -> Self { method from (line 255) | fn from(state: WalkTheDogState) -> Self { type WalkTheDogState (line 60) | struct WalkTheDogState { function draw (line 66) | fn draw(&self, renderer: &Renderer) { type Ready (line 71) | struct Ready; function new (line 74) | fn new(walk: Walk) -> WalkTheDogState { function run_right (line 82) | fn run_right(&mut self) { function start_running (line 86) | fn start_running(mut self) -> WalkTheDogState { function update (line 95) | fn update(mut self, keystate: &KeyState) -> ReadyEndState { type ReadyEndState (line 105) | enum ReadyEndState { type Walking (line 119) | struct Walking; function end_game (line 122) | fn end_game(self) -> WalkTheDogState { function update (line 137) | fn update(mut self, keystate: &KeyState) -> WalkingEndState { type WalkingEndState (line 183) | enum WalkingEndState { type GameOver (line 197) | struct GameOver { method new_game_pressed (line 237) | fn new_game_pressed(&mut self) -> bool { function update (line 202) | fn update(mut self) -> GameOverEndState { function new_game (line 210) | fn new_game(self) -> WalkTheDogState { type GameOverEndState (line 222) | enum GameOverEndState { type Obstacle (line 260) | pub trait Obstacle { method check_intersection (line 261) | fn check_intersection(&self, boy: &mut RedHatBoy); method draw (line 262) | fn draw(&self, renderer: &Renderer); method move_horizontally (line 263) | fn move_horizontally(&mut self, x: i16); method right (line 264) | fn right(&self) -> i16; method check_intersection (line 312) | fn check_intersection(&self, boy: &mut RedHatBoy) { method draw (line 326) | fn draw(&self, renderer: &Renderer) { method move_horizontally (line 349) | fn move_horizontally(&mut self, x: i16) { method right (line 356) | fn right(&self) -> i16 { method check_intersection (line 1010) | fn check_intersection(&self, boy: &mut RedHatBoy) { method draw (line 1016) | fn draw(&self, renderer: &Renderer) { method move_horizontally (line 1020) | fn move_horizontally(&mut self, x: i16) { method right (line 1024) | fn right(&self) -> i16 { type Platform (line 267) | pub struct Platform { method new (line 275) | pub fn new( method bounding_boxes (line 306) | fn bounding_boxes(&self) -> &Vec { type RedHatBoy (line 364) | pub struct RedHatBoy { method new (line 371) | fn new(sprite_sheet: Sheet, image: HtmlImageElement, audio: Audio, sou... method reset (line 379) | fn reset(boy: Self) -> Self { method run_right (line 388) | fn run_right(&mut self) { method slide (line 392) | fn slide(&mut self) { method jump (line 396) | fn jump(&mut self) { method knock_out (line 400) | fn knock_out(&mut self) { method land_on (line 404) | fn land_on(&mut self, position: i16) { method update (line 408) | fn update(&mut self) { method knocked_out (line 412) | fn knocked_out(&self) -> bool { method pos_y (line 416) | fn pos_y(&self) -> i16 { method velocity_y (line 420) | fn velocity_y(&self) -> i16 { method walking_speed (line 424) | fn walking_speed(&self) -> i16 { method frame_name (line 428) | fn frame_name(&self) -> String { method current_sprite (line 436) | fn current_sprite(&self) -> Option<&Cell> { method bounding_box (line 440) | fn bounding_box(&self) -> Rect { method destination_box (line 452) | fn destination_box(&self) -> Rect { method draw (line 463) | fn draw(&self, renderer: &Renderer) { type RedHatBoyStateMachine (line 480) | enum RedHatBoyStateMachine { method transition (line 499) | fn transition(self, event: Event) -> Self { method frame_name (line 525) | fn frame_name(&self) -> &str { method context (line 536) | fn context(&self) -> &RedHatBoyContext { method knocked_out (line 547) | fn knocked_out(&self) -> bool { method update (line 551) | fn update(self) -> Self { method from (line 557) | fn from(state: RedHatBoyState) -> Self { method from (line 563) | fn from(state: RedHatBoyState) -> Self { method from (line 569) | fn from(state: RedHatBoyState) -> Self { method from (line 575) | fn from(state: RedHatBoyState) -> Self { method from (line 581) | fn from(state: RedHatBoyState) -> Self { method from (line 587) | fn from(state: RedHatBoyState) -> Self { method from (line 593) | fn from(state: SlidingEndState) -> Self { method from (line 602) | fn from(state: JumpingEndState) -> Self { method from (line 611) | fn from(state: FallingEndState) -> Self { type Event (line 489) | pub enum Event { constant FLOOR (line 623) | const FLOOR: i16 = 479; constant PLAYER_HEIGHT (line 624) | const PLAYER_HEIGHT: i16 = HEIGHT - FLOOR; constant RUNNING_SPEED (line 625) | const RUNNING_SPEED: i16 = 4; constant STARTING_POINT (line 626) | const STARTING_POINT: i16 = -20; constant IDLE_FRAMES (line 627) | const IDLE_FRAMES: u8 = 29; constant RUNNING_FRAMES (line 628) | const RUNNING_FRAMES: u8 = 23; constant JUMPING_FRAMES (line 629) | const JUMPING_FRAMES: u8 = 35; constant SLIDING_FRAMES (line 630) | const SLIDING_FRAMES: u8 = 14; constant FALLING_FRAMES (line 631) | const FALLING_FRAMES: u8 = 29; constant IDLE_FRAME_NAME (line 632) | const IDLE_FRAME_NAME: &str = "Idle"; constant RUN_FRAME_NAME (line 633) | const RUN_FRAME_NAME: &str = "Run"; constant SLIDING_FRAME_NAME (line 634) | const SLIDING_FRAME_NAME: &str = "Slide"; constant JUMPING_FRAME_NAME (line 635) | const JUMPING_FRAME_NAME: &str = "Jump"; constant FALLING_FRAME_NAME (line 636) | const FALLING_FRAME_NAME: &str = "Dead"; constant JUMP_SPEED (line 637) | const JUMP_SPEED: i16 = -25; constant GRAVITY (line 638) | const GRAVITY: i16 = 1; constant TERMINAL_VELOCITY (line 639) | const TERMINAL_VELOCITY: i16 = 20; type RedHatBoyState (line 642) | pub struct RedHatBoyState { function context (line 648) | pub fn context(&self) -> &RedHatBoyContext { function update_context (line 652) | fn update_context(&mut self, frames: u8) { type Idle (line 658) | pub struct Idle; function new (line 661) | pub fn new(audio: Audio, jump_sound: Sound) -> Self { function frame_name (line 677) | pub fn frame_name(&self) -> &str { function update (line 681) | pub fn update(mut self) -> RedHatBoyState { function run (line 686) | pub fn run(self) -> RedHatBoyState { type Running (line 695) | pub struct Running; function frame_name (line 698) | pub fn frame_name(&self) -> &str { function update (line 702) | pub fn update(mut self) -> RedHatBoyState { function jump (line 707) | pub fn jump(self) -> RedHatBoyState { function slide (line 718) | pub fn slide(self) -> RedHatBoyState { function knock_out (line 725) | pub fn knock_out(self) -> RedHatBoyState { function land_on (line 732) | pub fn land_on(self, position: i16) -> RedHatBoyState { type Jumping (line 741) | pub struct Jumping; type JumpingEndState (line 743) | pub enum JumpingEndState { function frame_name (line 749) | pub fn frame_name(&self) -> &str { function knock_out (line 753) | pub fn knock_out(self) -> RedHatBoyState { function update (line 760) | pub fn update(mut self) -> JumpingEndState { function land_on (line 770) | pub fn land_on(self, position: i16) -> RedHatBoyState { type Sliding (line 779) | pub struct Sliding; type SlidingEndState (line 781) | pub enum SlidingEndState { function frame_name (line 787) | pub fn frame_name(&self) -> &str { function stand (line 791) | pub fn stand(self) -> RedHatBoyState { function knock_out (line 798) | pub fn knock_out(self) -> RedHatBoyState { function update (line 805) | pub fn update(mut self) -> SlidingEndState { function land_on (line 815) | pub fn land_on(self, position: i16) -> RedHatBoyState { type Falling (line 824) | pub struct Falling; function frame_name (line 827) | pub fn frame_name(&self) -> &str { function knock_out (line 831) | pub fn knock_out(self) -> RedHatBoyState { function update (line 838) | pub fn update(mut self) -> FallingEndState { type FallingEndState (line 848) | pub enum FallingEndState { type KnockedOut (line 854) | pub struct KnockedOut; function frame_name (line 857) | pub fn frame_name(&self) -> &str { type RedHatBoyContext (line 863) | pub struct RedHatBoyContext { method update (line 872) | pub fn update(mut self, frame_count: u8) -> Self { method reset_frame (line 892) | fn reset_frame(mut self) -> Self { method set_vertical_velocity (line 897) | fn set_vertical_velocity(mut self, y: i16) -> Self { method run_right (line 902) | fn run_right(mut self) -> Self { method stop (line 907) | fn stop(mut self) -> Self { method set_on (line 913) | fn set_on(mut self, position: i16) -> Self { method play_jump_sound (line 919) | fn play_jump_sound(self) -> Self { type Walk (line 928) | pub struct Walk { method knocked_out (line 939) | fn knocked_out(&self) -> bool { method reset (line 943) | fn reset(walk: Self) -> Self { method draw (line 959) | fn draw(&self, renderer: &Renderer) { method velocity (line 973) | fn velocity(&self) -> i16 { method generate_next_segment (line 977) | fn generate_next_segment(&mut self) { type Barrier (line 999) | pub struct Barrier { method new (line 1004) | pub fn new(image: Image) -> Self { method initialize (line 1031) | async fn initialize(&self) -> Result> { method update (line 1085) | fn update(&mut self, keystate: &KeyState) { method draw (line 1092) | fn draw(&self, renderer: &Renderer) { function rightmost (line 1101) | fn rightmost(obstacle_list: &[Box]) -> i16 { function test_transition_from_game_over_to_new_game (line 1121) | fn test_transition_from_game_over_to_new_game() { FILE: src/lib.rs function main_js (line 14) | pub fn main_js() -> Result<(), JsValue> { FILE: src/segments.rs constant LOW_PLATFORM (line 7) | const LOW_PLATFORM: i16 = 420; constant HIGH_PLATFORM (line 8) | const HIGH_PLATFORM: i16 = 375; constant FIRST_PLATFORM (line 9) | const FIRST_PLATFORM: i16 = 370; constant STONE_ON_GROUND (line 11) | const STONE_ON_GROUND: i16 = 546; constant FLOATING_PLATFORM_SPRITES (line 13) | const FLOATING_PLATFORM_SPRITES: [&str; 3] = ["13.png", "14.png", "15.pn... constant PLATFORM_WIDTH (line 14) | const PLATFORM_WIDTH: i16 = 384; constant PLATFORM_HEIGHT (line 15) | const PLATFORM_HEIGHT: i16 = 93; constant PLATFORM_EDGE_WIDTH (line 16) | const PLATFORM_EDGE_WIDTH: i16 = 60; constant PLATFORM_EDGE_HEIGHT (line 17) | const PLATFORM_EDGE_HEIGHT: i16 = 54; constant FLOATING_PLATFORM_BOUNDING_BOXES (line 18) | const FLOATING_PLATFORM_BOUNDING_BOXES: [Rect; 3] = [ function create_floating_platform (line 34) | fn create_floating_platform(sprite_sheet: Rc, position: Poi... function stone_and_platform (line 43) | pub fn stone_and_platform( function platform_and_stone (line 68) | pub fn platform_and_stone( FILE: src/sound.rs function create_audio_context (line 7) | pub fn create_audio_context() -> Result { function create_buffer_source (line 11) | fn create_buffer_source(ctx: &AudioContext) -> Result Resu... type LOOPING (line 32) | pub enum LOOPING { function play_sound (line 37) | pub fn play_sound(ctx: &AudioContext, buffer: &AudioBuffer, looping: LOO... function decode_audio_data (line 48) | pub async fn decode_audio_data( FILE: tests/app.rs function rust_test (line 10) | fn rust_test() { function web_test (line 16) | fn web_test() {