SYMBOL INDEX (195 symbols across 32 files) FILE: practices/doc-comments/src/compute.rs function div (line 11) | pub fn div(a: i32, b: i32) -> i32 { function try_div (line 30) | pub fn try_div(a: i32, b: i32) -> Result { FILE: practices/doc-comments/src/lib.rs function add_one (line 17) | pub fn add_one(x: i32) -> i32 { function add_two (line 34) | pub fn add_two(x: i32) -> i32 { function add_three (line 40) | pub fn add_three(x: i32) -> Option { function add_four (line 47) | pub fn add_four(x: i32) -> Option { type MySpecialFormatter (line 52) | struct MySpecialFormatter; FILE: practices/hello-package/src/back_of_house.rs function fix_incorrect_order (line 2) | pub fn fix_incorrect_order() { function cook_order (line 7) | pub fn cook_order() {} FILE: practices/hello-package/src/front_of_house/hosting.rs function add_to_waitlist (line 1) | pub fn add_to_waitlist() {} function seat_at_table (line 3) | pub fn seat_at_table() -> String { FILE: practices/hello-package/src/front_of_house/serving.rs function take_order (line 1) | pub fn take_order() {} function serve_order (line 3) | pub fn serve_order() {} function take_payment (line 5) | pub fn take_payment() {} function complain (line 9) | fn complain() {} FILE: practices/hello-package/src/lib.rs function eat_at_restaurant (line 6) | pub fn eat_at_restaurant() -> String { FILE: practices/hello-package/src/main.rs function main (line 1) | fn main() { FILE: zh-CN/assets/mini-redis/examples/chat.rs function main (line 2) | async fn main() { FILE: zh-CN/assets/mini-redis/examples/hello_world.rs function main (line 19) | pub async fn main() -> Result<()> { FILE: zh-CN/assets/mini-redis/examples/pub.rs function main (line 23) | async fn main() -> Result<()> { FILE: zh-CN/assets/mini-redis/examples/sub.rs function main (line 23) | pub async fn main() -> Result<()> { FILE: zh-CN/assets/mini-redis/src/bin/cli.rs type Cli (line 11) | struct Cli { type Command (line 23) | enum Command { function main (line 54) | async fn main() -> mini_redis::Result<()> { function duration_from_ms_str (line 101) | fn duration_from_ms_str(src: &str) -> Result { function bytes_from_str (line 106) | fn bytes_from_str(src: &str) -> Bytes { FILE: zh-CN/assets/mini-redis/src/bin/server.rs function main (line 16) | pub async fn main() -> mini_redis::Result<()> { type Cli (line 34) | struct Cli { FILE: zh-CN/assets/mini-redis/src/blocking_client.rs type BlockingClient (line 19) | pub struct BlockingClient { method get (line 101) | pub fn get(&mut self, key: &str) -> crate::Result> { method set (line 130) | pub fn set(&mut self, key: &str, value: Bytes) -> crate::Result<()> { method set_expires (line 173) | pub fn set_expires( method publish (line 203) | pub fn publish(&mut self, channel: &str, message: Bytes) -> crate::Res... method subscribe (line 215) | pub fn subscribe(self, channels: Vec) -> crate::Result &[String] { method next_message (line 234) | pub fn next_message(&mut self) -> crate::Result> { method into_iter (line 240) | pub fn into_iter(self) -> impl Iterator> { method subscribe (line 248) | pub fn subscribe(&mut self, channels: &[String]) -> crate::Result<()> { method unsubscribe (line 253) | pub fn unsubscribe(&mut self, channels: &[String]) -> crate::Result<()> { type SubscriberIterator (line 44) | struct SubscriberIterator { function connect (line 72) | pub fn connect(addr: T) -> crate::Result; method next (line 261) | fn next(&mut self) -> Option> { FILE: zh-CN/assets/mini-redis/src/buffer.rs function buffer (line 24) | pub fn buffer(client: Client) -> Buffer { type Command (line 38) | enum Command { type Message (line 50) | type Message = (Command, oneshot::Sender>>); function run (line 54) | async fn run(mut client: Client, mut rx: Receiver) { type Buffer (line 74) | pub struct Buffer { method get (line 83) | pub async fn get(&mut self, key: &str) -> Result> { method set (line 104) | pub async fn set(&mut self, key: &str, value: Bytes) -> Result<()> { FILE: zh-CN/assets/mini-redis/src/client.rs type Client (line 23) | pub struct Client { method get (line 110) | pub async fn get(&mut self, key: &str) -> crate::Result> { method set (line 159) | pub async fn set(&mut self, key: &str, value: Bytes) -> crate::Result<... method set_expires (line 207) | pub async fn set_expires( method set_cmd (line 220) | async fn set_cmd(&mut self, cmd: Set) -> crate::Result<()> { method publish (line 260) | pub async fn publish(&mut self, channel: &str, message: Bytes) -> crat... method subscribe (line 284) | pub async fn subscribe(mut self, channels: Vec) -> crate::Resu... method subscribe_cmd (line 298) | async fn subscribe_cmd(&mut self, channels: &[String]) -> crate::Resul... method read_response (line 339) | async fn read_response(&mut self) -> crate::Result { type Subscriber (line 39) | pub struct Subscriber { method get_subscribed (line 362) | pub fn get_subscribed(&self) -> &[String] { method next_message (line 370) | pub async fn next_message(&mut self) -> crate::Result> { method into_stream (line 398) | pub fn into_stream(mut self) -> impl Stream crate::Resul... method unsubscribe (line 425) | pub async fn unsubscribe(&mut self, channels: &[String]) -> crate::Res... type Message (line 49) | pub struct Message { function connect (line 75) | pub async fn connect(addr: T) -> crate::Result { FILE: zh-CN/assets/mini-redis/src/cmd/get.rs type Get (line 12) | pub struct Get { method new (line 19) | pub fn new(key: impl ToString) -> Get { method key (line 26) | pub fn key(&self) -> &str { method parse_frames (line 50) | pub(crate) fn parse_frames(parse: &mut Parse) -> crate::Result { method apply (line 64) | pub(crate) async fn apply(self, db: &Db, dst: &mut Connection) -> crat... method into_frame (line 87) | pub(crate) fn into_frame(self) -> Frame { FILE: zh-CN/assets/mini-redis/src/cmd/mod.rs type Command (line 22) | pub enum Command { method from_frame (line 40) | pub fn from_frame(frame: Frame) -> crate::Result { method apply (line 85) | pub(crate) async fn apply( method get_name (line 106) | pub(crate) fn get_name(&self) -> &str { FILE: zh-CN/assets/mini-redis/src/cmd/publish.rs type Publish (line 13) | pub struct Publish { method new (line 23) | pub(crate) fn new(channel: impl ToString, message: Bytes) -> Publish { method parse_frames (line 50) | pub(crate) fn parse_frames(parse: &mut Parse) -> crate::Result { method apply (line 67) | pub(crate) async fn apply(self, db: &Db, dst: &mut Connection) -> crat... method into_frame (line 93) | pub(crate) fn into_frame(self) -> Frame { FILE: zh-CN/assets/mini-redis/src/cmd/set.rs type Set (line 21) | pub struct Set { method new (line 37) | pub fn new(key: impl ToString, value: Bytes, expire: Option)... method key (line 46) | pub fn key(&self) -> &str { method value (line 51) | pub fn value(&self) -> &Bytes { method expire (line 56) | pub fn expire(&self) -> Option { method parse_frames (line 80) | pub(crate) fn parse_frames(parse: &mut Parse) -> crate::Result { method apply (line 128) | pub(crate) async fn apply(self, db: &Db, dst: &mut Connection) -> crat... method into_frame (line 144) | pub(crate) fn into_frame(self) -> Frame { FILE: zh-CN/assets/mini-redis/src/cmd/subscribe.rs type Subscribe (line 16) | pub struct Subscribe { method new (line 37) | pub(crate) fn new(channels: &[String]) -> Subscribe { method parse_frames (line 63) | pub(crate) fn parse_frames(parse: &mut Parse) -> crate::Result Frame { type Unsubscribe (line 25) | pub struct Unsubscribe { method new (line 285) | pub(crate) fn new(channels: &[String]) -> Unsubscribe { method parse_frames (line 311) | pub(crate) fn parse_frames(parse: &mut Parse) -> Result Frame { type Messages (line 33) | type Messages = Pin + Send>>; function subscribe_to_channel (line 172) | async fn subscribe_to_channel( function handle_command (line 207) | async fn handle_command( function make_subscribe_frame (line 256) | fn make_subscribe_frame(channel_name: String, num_subs: usize) -> Frame { function make_unsubscribe_frame (line 265) | fn make_unsubscribe_frame(channel_name: String, num_subs: usize) -> Frame { function make_message_frame (line 275) | fn make_message_frame(channel_name: String, msg: Bytes) -> Frame { FILE: zh-CN/assets/mini-redis/src/cmd/unknown.rs type Unknown (line 7) | pub struct Unknown { method new (line 14) | pub(crate) fn new(key: impl ToString) -> Unknown { method get_name (line 21) | pub(crate) fn get_name(&self) -> &str { method apply (line 29) | pub(crate) async fn apply(self, dst: &mut Connection) -> crate::Result... FILE: zh-CN/assets/mini-redis/src/connection.rs type Connection (line 21) | pub struct Connection { method new (line 34) | pub fn new(socket: TcpStream) -> Connection { method read_frame (line 56) | pub async fn read_frame(&mut self) -> crate::Result> { method parse_frame (line 88) | fn parse_frame(&mut self) -> crate::Result> { method write_frame (line 157) | pub async fn write_frame(&mut self, frame: &Frame) -> io::Result<()> { method write_value (line 185) | async fn write_value(&mut self, frame: &Frame) -> io::Result<()> { method write_decimal (line 223) | async fn write_decimal(&mut self, val: u64) -> io::Result<()> { FILE: zh-CN/assets/mini-redis/src/db.rs type DbDropGuard (line 13) | pub(crate) struct DbDropGuard { method new (line 109) | pub(crate) fn new() -> DbDropGuard { method db (line 115) | pub(crate) fn db(&self) -> Db { type Db (line 32) | pub(crate) struct Db { method new (line 130) | pub(crate) fn new() -> Db { method get (line 153) | pub(crate) fn get(&self, key: &str) -> Option { method set (line 166) | pub(crate) fn set(&self, key: String, value: Bytes, expire: Option broadcast::Receiver usize { method shutdown_purge_task (line 282) | fn shutdown_purge_task(&self) { type Shared (line 39) | struct Shared { method purge_expired_keys (line 299) | fn purge_expired_keys(&self) -> Option { method is_shutdown (line 337) | fn is_shutdown(&self) -> bool { type State (line 61) | struct State { method next_expiration (line 343) | fn next_expiration(&self) -> Option { type Entry (line 94) | struct Entry { method drop (line 121) | fn drop(&mut self) { function purge_expired_tasks (line 355) | async fn purge_expired_tasks(shared: Arc) { FILE: zh-CN/assets/mini-redis/src/frame.rs type Frame (line 13) | pub enum Frame { method array (line 33) | pub(crate) fn array() -> Frame { method push_bulk (line 42) | pub(crate) fn push_bulk(&mut self, bytes: Bytes) { method push_int (line 56) | pub(crate) fn push_int(&mut self, value: u64) { method check (line 66) | pub fn check(src: &mut Cursor<&[u8]>) -> Result<(), Error> { method parse (line 106) | pub fn parse(src: &mut Cursor<&[u8]>) -> Result { method to_error (line 171) | pub(crate) fn to_error(&self) -> crate::Error { method eq (line 177) | fn eq(&self, other: &&str) -> bool { method fmt (line 187) | fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { type Error (line 23) | pub enum Error { method from (line 268) | fn from(src: String) -> Error { method from (line 274) | fn from(src: &str) -> Error { method from (line 280) | fn from(_src: FromUtf8Error) -> Error { method from (line 286) | fn from(_src: TryFromIntError) -> Error { method fmt (line 294) | fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { function peek_u8 (line 213) | fn peek_u8(src: &mut Cursor<&[u8]>) -> Result { function get_u8 (line 221) | fn get_u8(src: &mut Cursor<&[u8]>) -> Result { function skip (line 229) | fn skip(src: &mut Cursor<&[u8]>, n: usize) -> Result<(), Error> { function get_decimal (line 239) | fn get_decimal(src: &mut Cursor<&[u8]>) -> Result { function get_line (line 248) | fn get_line<'a>(src: &mut Cursor<&'a [u8]>) -> Result<&'a [u8], Error> { FILE: zh-CN/assets/mini-redis/src/lib.rs constant DEFAULT_PORT (line 58) | pub const DEFAULT_PORT: &str = "6379"; type Error (line 71) | pub type Error = Box; type Result (line 76) | pub type Result = std::result::Result; FILE: zh-CN/assets/mini-redis/src/parse.rs type Parse (line 13) | pub(crate) struct Parse { method new (line 36) | pub(crate) fn new(frame: Frame) -> Result { method next (line 49) | fn next(&mut self) -> Result { method next_string (line 59) | pub(crate) fn next_string(&mut self) -> Result { method next_bytes (line 82) | pub(crate) fn next_bytes(&mut self) -> Result { method next_int (line 105) | pub(crate) fn next_int(&mut self) -> Result { method finish (line 122) | pub(crate) fn finish(&mut self) -> Result<(), ParseError> { type ParseError (line 23) | pub(crate) enum ParseError { method from (line 132) | fn from(src: String) -> ParseError { method from (line 138) | fn from(src: &str) -> ParseError { method fmt (line 144) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { FILE: zh-CN/assets/mini-redis/src/server.rs type Listener (line 18) | struct Listener { method run (line 227) | async fn run(&mut self) -> crate::Result<()> { method accept (line 291) | async fn accept(&mut self) -> crate::Result { type Handler (line 70) | struct Handler { method run (line 331) | async fn run(&mut self) -> crate::Result<()> { constant MAX_CONNECTIONS (line 120) | const MAX_CONNECTIONS: usize = 250; function run (line 131) | pub async fn run(listener: TcpListener, shutdown: impl Future) { method drop (line 386) | fn drop(&mut self) { FILE: zh-CN/assets/mini-redis/src/shutdown.rs type Shutdown (line 13) | pub(crate) struct Shutdown { method new (line 23) | pub(crate) fn new(notify: broadcast::Receiver<()>) -> Shutdown { method is_shutdown (line 31) | pub(crate) fn is_shutdown(&self) -> bool { method recv (line 36) | pub(crate) async fn recv(&mut self) { FILE: zh-CN/assets/mini-redis/tests/buffer.rs function pool_key_value_get_set (line 11) | async fn pool_key_value_get_set() { function start_server (line 23) | async fn start_server() -> (SocketAddr, JoinHandle<()>) { FILE: zh-CN/assets/mini-redis/tests/client.rs function key_value_get_set (line 10) | async fn key_value_get_set() { function receive_message_subscribed_channel (line 23) | async fn receive_message_subscribed_channel() { function receive_message_multiple_subscribed_channels (line 41) | async fn receive_message_multiple_subscribed_channels() { function unsubscribes_from_channels (line 72) | async fn unsubscribes_from_channels() { function start_server (line 85) | async fn start_server() -> (SocketAddr, JoinHandle<()>) { FILE: zh-CN/assets/mini-redis/tests/server.rs function key_value_get_set (line 13) | async fn key_value_get_set() { function key_value_timeout (line 68) | async fn key_value_timeout() { function pub_sub (line 123) | async fn pub_sub() { function manage_subscription (line 246) | async fn manage_subscription() { function send_error_unknown_command (line 337) | async fn send_error_unknown_command() { function send_error_get_set_after_subscribe (line 359) | async fn send_error_get_set_after_subscribe() { function start_server (line 400) | async fn start_server() -> SocketAddr {