舉報

會員
Rust Programming By Example
ThisbookisforsoftwaredevelopersinterestedinsystemlevelandapplicationprogrammingwhoarelookingforaquickentryintousingRustandunderstandingthecorefeaturesoftheRustProgramming.It’sassumedthatyouhaveabasicunderstandingofJava,C#,Ruby,Python,orJavaScript.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Summary
- Matching
- Specifying types
- Big number formatting
品牌:中圖公司
上架時間:2021-07-02 18:20:22
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-07-02 19:13:51
- Other Books You May Enjoy
- Summary
- Matching
- Specifying types
- Big number formatting
- Code readability
- Playing with moves
- Playing with mutable borrows
- Builder pattern
- Usage tips
- Using the Path function
- Explaining the Some function
- API tips and improvements
- Slices
- Rust best practices
- Rust Best Practices
- Summary
- Fuzzing tests
- Hiding code blocks lines
- About the doc blocks themselves
- Combining flags?
- should_panic
- no_run
- compile_fail
- ignore
- Tags
- Documentation tests
- Hiding items from the documentation
- Warning about public items without documentation
- Generating the documentation
- Documenting an enumeration (or any type with public fields)
- Code blocks
- Headers
- Documenting a module
- Documenting a crate
- Documentation
- Print output to stdout
- Teardown
- Integration tests
- Ignoring tests
- Testing failures
- Backtraces
- Unit tests
- Securing the config.toml access
- Configuration
- Going further!
- Uploading files
- Downloading a file
- Listing files
- Implementing Asynchronous File Transfer
- Summary
- Removing directories
- Creating directories
- Quitting
- Encoding data bytes
- Decoding data bytes
- Bytes codec
- Entering passive mode
- Setting the transfer type
- Changing the current directory
- Printing the current directory
- Managing the current working directory
- Handling commands
- Encoding FTP commands
- Decoding FTP commands
- FTP codec
- Handling commands
- Handling clients
- Starting the server
- Starting the Tokio event loop
- The ? operator revisited
- Composing error types
- Displaying the error
- Custom error type
- Unwrapping
- Handling errors
- Using futures
- Tokio event loop
- Using Tokio
- Creating the new project
- Disadvantages of asynchronous IO
- Advantages of asynchronous IO
- Implementing an Asynchronous FTP Server
- Summary
- Testing it
- Implementing the RMD command
- Implementing the MKD command
- Full implementation of the LIST command
- Implementing the CDUP command
- Implementing the CWD command
- Back to the LIST command
- Implementing the PASV command
- Implementing the LIST command
- Implementing the TYPE command
- Implementing the PWD command
- Implementing the NOOP command
- Implementing the USER command
- Implementing the SYST command
- Commands implementation
- Starting with basics
- Implementing simple chunks of commands
- Introduction to FTP
- File transfer protocol
- Understanding FTP
- Summary
- Relm widgets data binding
- Using relm on stable Rust
- Computing the song duration
- Playing music
- Syntax sugar to send a message to another relm widget
- Handle messages from a relm widget
- With different widgets
- Emit
- Communicating with the same widget
- Communicating between widgets
- Adding a relm widget
- Model parameter
- Playlist
- Other methods
- Dialogs
- Post-initialization of the view
- One-way data binding
- Adding child widgets
- Update function
- Code generation
- Events
- Properties
- View
- Messages
- Model
- Widget
- Installing Rust nightly
- Creating a window with relm
- Creating custom widgets
- Asynchronous user interface
- State mutation
- Reasons to use relm instead of gtk-rs directly
- Music Player in a More Rusty Way with Relm
- Summary
- Using gstreamer for playback
- Loading a playlist
- Saving a playlist
- Loading and saving the playlist
- Showing the song's current time
- Condition variable
- Improving CPU usage
- Showing the progression of the song
- Interior mutability
- Pausing and resuming the song
- Using the music player
- RAII
- Mutex guard
- Playing music
- Lock-free data structures
- Sync trait
- Send trait
- Mutual exclusion
- Atomic reference counting
- Event loop
- Playing music
- Getting the frame samples
- Implementing an MP3 decoder
- Adding dependencies
- Decoding MP3 files
- Installing dependencies on Windows
- Installing dependencies on Mac
- Installing dependencies on Linux
- Installing the dependencies
- Implementing the Engine of the Music Player
- Summary
- Displaying the cover when playing a song
- Deleting a song
- Opening files with a file dialog
- ID3— MP3 metadata
- Reference-counting pointer
- Opening MP3 files
- The MVC pattern
- Adding a playlist
- The Box container
- Types of containers
- Containers
- Ownership
- Lifetime
- Adding tool button events
- Improving the organization of the application
- Stock item
- Creating a toolbar
- Preventing the default behavior of an event
- Closure
- Creating your first window
- Installing GTK+ on Windows
- Installing GTK+ on Mac
- Installing GTK+ on Linux
- Installing the prerequisite
- Creating a Music Player
- Summary
- Loading font
- Other system/package manager
- Install on Linux
- Install on OS X
- Playing with fonts
- Rendering
- Rendering initialization
- Rendering UI
- Getting started with game mechanisms
- Adding All Game Mechanisms
- Summary
- Highscores loading/overwriting
- Levels and lines sent
- Score level lines sent
- SDL events
- Interacting with the game map
- Tetris struct
- Rotating a tetrimino
- Generating a tetrimino
- Creating tetriminos
- Tetrimino
- Writing Tetris
- Events and Basic Game Mechanisms
- Summary
- Reading formatted data from files
- Iterators
- Saving/loading high scores
- Handling files
- Playing with images
- Playing with features
- Installing SDL2_image on Windows
- Installing SDL2_image on Linux
- Installing SDL2_image on Mac
- Loading images
- Solution
- Playing with Options
- Drawing
- Creating a window
- Tetris
- Rust's modules
- Back to our Cargo.toml file
- The docs.rs documentation
- Cargo and crates.io
- Setting up your Rust project
- Windows (MSVC)
- Windows (MinGW)
- Windows with Build Script
- Installing SDL2 on Windows
- Installing SDL2 on Mac
- Installing SDL2 on Linux
- Installing SDL2
- Understanding Rust crates
- Starting with SDL
- Summary
- Optional quantifier
- Repetitions
- Multiple pattern rules
- Macros
- For loops
- Slices
- Arrays
- The Option type
- Generics
- Rules
- Associated types
- Default methods
- Traits
- Irrefutable patterns
- Pattern matching
- Enumerations
- Tuples
- Constructors
- Methods
- Mutable references
- Copy types
- Clone types
- References
- Creating structures
- Creating functions
- Creating while loops
- Writing a condition
- Control flow
- Character type
- Boolean type
- Floating-point types
- Integer types
- Built-in data types
- Variables
- Main function
- Documentation and reference
- Test your installation
- Linux/Mac
- Windows
- Installing Rust
- Getting to know Rust
- Basics of Rust
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewers
- About the authors
- Contributors
- PacktPub.com
- Why subscribe?
- Packt Upsell
- 版權信息
- 封面
- 封面
- 版權信息
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the authors
- About the reviewers
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Basics of Rust
- Getting to know Rust
- Installing Rust
- Windows
- Linux/Mac
- Test your installation
- Documentation and reference
- Main function
- Variables
- Built-in data types
- Integer types
- Floating-point types
- Boolean type
- Character type
- Control flow
- Writing a condition
- Creating while loops
- Creating functions
- Creating structures
- References
- Clone types
- Copy types
- Mutable references
- Methods
- Constructors
- Tuples
- Enumerations
- Pattern matching
- Irrefutable patterns
- Traits
- Default methods
- Associated types
- Rules
- Generics
- The Option type
- Arrays
- Slices
- For loops
- Macros
- Multiple pattern rules
- Repetitions
- Optional quantifier
- Summary
- Starting with SDL
- Understanding Rust crates
- Installing SDL2
- Installing SDL2 on Linux
- Installing SDL2 on Mac
- Installing SDL2 on Windows
- Windows with Build Script
- Windows (MinGW)
- Windows (MSVC)
- Setting up your Rust project
- Cargo and crates.io
- The docs.rs documentation
- Back to our Cargo.toml file
- Rust's modules
- Tetris
- Creating a window
- Drawing
- Playing with Options
- Solution
- Loading images
- Installing SDL2_image on Mac
- Installing SDL2_image on Linux
- Installing SDL2_image on Windows
- Playing with features
- Playing with images
- Handling files
- Saving/loading high scores
- Iterators
- Reading formatted data from files
- Summary
- Events and Basic Game Mechanisms
- Writing Tetris
- Tetrimino
- Creating tetriminos
- Generating a tetrimino
- Rotating a tetrimino
- Tetris struct
- Interacting with the game map
- SDL events
- Score level lines sent
- Levels and lines sent
- Highscores loading/overwriting
- Summary
- Adding All Game Mechanisms
- Getting started with game mechanisms
- Rendering UI
- Rendering initialization
- Rendering
- Playing with fonts
- Install on OS X
- Install on Linux
- Other system/package manager
- Loading font
- Summary
- Creating a Music Player
- Installing the prerequisite
- Installing GTK+ on Linux
- Installing GTK+ on Mac
- Installing GTK+ on Windows
- Creating your first window
- Closure
- Preventing the default behavior of an event
- Creating a toolbar
- Stock item
- Improving the organization of the application
- Adding tool button events
- Lifetime
- Ownership
- Containers
- Types of containers
- The Box container
- Adding a playlist
- The MVC pattern
- Opening MP3 files
- Reference-counting pointer
- ID3— MP3 metadata
- Opening files with a file dialog
- Deleting a song
- Displaying the cover when playing a song
- Summary
- Implementing the Engine of the Music Player
- Installing the dependencies
- Installing dependencies on Linux
- Installing dependencies on Mac
- Installing dependencies on Windows
- Decoding MP3 files
- Adding dependencies
- Implementing an MP3 decoder
- Getting the frame samples
- Playing music
- Event loop
- Atomic reference counting
- Mutual exclusion
- Send trait
- Sync trait
- Lock-free data structures
- Playing music
- Mutex guard
- RAII
- Using the music player
- Pausing and resuming the song
- Interior mutability
- Showing the progression of the song
- Improving CPU usage
- Condition variable
- Showing the song's current time
- Loading and saving the playlist
- Saving a playlist
- Loading a playlist
- Using gstreamer for playback
- Summary
- Music Player in a More Rusty Way with Relm
- Reasons to use relm instead of gtk-rs directly
- State mutation
- Asynchronous user interface
- Creating custom widgets
- Creating a window with relm
- Installing Rust nightly
- Widget
- Model
- Messages
- View
- Properties
- Events
- Code generation
- Update function
- Adding child widgets
- One-way data binding
- Post-initialization of the view
- Dialogs
- Other methods
- Playlist
- Model parameter
- Adding a relm widget
- Communicating between widgets
- Communicating with the same widget
- Emit
- With different widgets
- Handle messages from a relm widget
- Syntax sugar to send a message to another relm widget
- Playing music
- Computing the song duration
- Using relm on stable Rust
- Relm widgets data binding
- Summary
- Understanding FTP
- File transfer protocol
- Introduction to FTP
- Implementing simple chunks of commands
- Starting with basics
- Commands implementation
- Implementing the SYST command
- Implementing the USER command
- Implementing the NOOP command
- Implementing the PWD command
- Implementing the TYPE command
- Implementing the LIST command
- Implementing the PASV command
- Back to the LIST command
- Implementing the CWD command
- Implementing the CDUP command
- Full implementation of the LIST command
- Implementing the MKD command
- Implementing the RMD command
- Testing it
- Summary
- Implementing an Asynchronous FTP Server
- Advantages of asynchronous IO
- Disadvantages of asynchronous IO
- Creating the new project
- Using Tokio
- Tokio event loop
- Using futures
- Handling errors
- Unwrapping
- Custom error type
- Displaying the error
- Composing error types
- The ? operator revisited
- Starting the Tokio event loop
- Starting the server
- Handling clients
- Handling commands
- FTP codec
- Decoding FTP commands
- Encoding FTP commands
- Handling commands
- Managing the current working directory
- Printing the current directory
- Changing the current directory
- Setting the transfer type
- Entering passive mode
- Bytes codec
- Decoding data bytes
- Encoding data bytes
- Quitting
- Creating directories
- Removing directories
- Summary
- Implementing Asynchronous File Transfer
- Listing files
- Downloading a file
- Uploading files
- Going further!
- Configuration
- Securing the config.toml access
- Unit tests
- Backtraces
- Testing failures
- Ignoring tests
- Integration tests
- Teardown
- Print output to stdout
- Documentation
- Documenting a crate
- Documenting a module
- Headers
- Code blocks
- Documenting an enumeration (or any type with public fields)
- Generating the documentation
- Warning about public items without documentation
- Hiding items from the documentation
- Documentation tests
- Tags
- ignore
- compile_fail
- no_run
- should_panic
- Combining flags?
- About the doc blocks themselves
- Hiding code blocks lines
- Fuzzing tests
- Summary
- Rust Best Practices
- Rust best practices
- Slices
- API tips and improvements
- Explaining the Some function
- Using the Path function
- Usage tips
- Builder pattern
- Playing with mutable borrows
- Playing with moves
- Code readability
- Big number formatting
- Specifying types
- Matching
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-07-02 19:13:51