MCPcopy Create free account

hub / github.com/daheige/rust-in-action / functions

Functions1,131 in github.com/daheige/rust-in-action

↓ 43 callersMethodget
(&self, key: &str)
part11/qa-project/crates/qa-svc/src/infrastructure/cache/user_session.rs:16
↓ 40 callersMethodclone
(&self)
part11/qa-project/crates/pb/src/qa.rs:1670
↓ 32 callersFunctionfile_qa_proto_rawDescGZIP
()
part11/qa-project/clients/go/pb/qa.pb.go:1952
↓ 32 callersMethodinitOnce
()
part11/qa-project/clients/php/App/Grpc/GPBMetadata/Qa.php:12
↓ 30 callersMethodfrom
(value: i32)
part5/from-into-convert/src/main.rs:9
↓ 22 callersMethodexecute
(&self, f: F)
part4/web-server/src/multi_server.rs:133
↓ 12 callersMethodsetUsername
* 用户名 * * Generated from protobuf field <code>string username = 1;</code> * @param string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/UserLoginRequest.php:67
↓ 11 callersMethodfetch_one
查询用户信息
part11/qa-project/crates/qa-svc/src/infrastructure/persistence/user.rs:58
↓ 11 callersMethodgetId
* 回答id * * Generated from protobuf field <code>uint64 id = 1;</code> * @return int|string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:87
↓ 11 callersMethodsetId
* 回答id * * Generated from protobuf field <code>uint64 id = 1;</code> * @param int|string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:99
↓ 10 callersMethodgetUsername
* 用户名 * * Generated from protobuf field <code>string username = 1;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/UserLoginRequest.php:55
↓ 8 callersMethodadd
插入用户
part11/qa-project/crates/qa-svc/src/infrastructure/persistence/user.rs:35
↓ 8 callersMethodgetState
* Generated from protobuf field <code>int64 state = 1;</code> * @return int|string */
part11/qa-project/clients/php/App/Grpc/Qa/UserLogoutReply.php:42
↓ 8 callersFunctioninit
()
part11/qa-project/clients/go/pb/qa.pb.go:2037
↓ 8 callersMethodsetState
* Generated from protobuf field <code>int64 state = 1;</code> * @param int|string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/UserLogoutReply.php:52
↓ 6 callersMethodinit
日志初始化 其中日志level优先级从高到低:error > warn > info > debug > trace
part11/qa-project/crates/infras/src/logger.rs:22
↓ 5 callersMethodconnect
Attempt to create a new client by connecting to a given endpoint.
part11/qa-project/crates/pb/src/qa.rs:353
↓ 5 callersMethodgetContent
* 回答内容 * * Generated from protobuf field <code>string content = 3;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:139
↓ 5 callersMethodgetToken
* 登录成功返回的唯一标识token * * Generated from protobuf field <code>string token = 1;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/UserLoginReply.php:47
↓ 5 callersFunctiongraceful_shutdown
平滑退出处理,它是通过接收退出信号量的方式完成, 当接收到退出信号量时,程序会等待一段时间,再退出。 在这个退出期间,程序可以做一些其他的清理操作
part11/qa-project/crates/infras/src/shutdown.rs:7
↓ 5 callersFunctionpool
创建mysql pool 连接池
part11/qa-project/crates/qa-svc/src/config/mysql.rs:20
↓ 5 callersMethodsetContent
* 回答内容 * * Generated from protobuf field <code>string content = 3;</code> * @param string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:151
↓ 4 callersMethodgetAnswer
* Generated from protobuf field <code>.qa.AnswerEntity answer = 1;</code> * @return \App\Grpc\Qa\AnswerEntity|null */
part11/qa-project/clients/php/App/Grpc/Qa/AddAnswerRequest.php:42
↓ 4 callersMethodgetCreatedBy
* 回答者 * * Generated from protobuf field <code>string created_by = 4;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:165
↓ 4 callersFunctionpool
创建mysql pool 连接池
part7/article-svc/src/config/mysql.rs:18
↓ 4 callersMethodsetAnswer
* Generated from protobuf field <code>.qa.AnswerEntity answer = 1;</code> * @param \App\Grpc\Qa\AnswerEntity $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/AddAnswerRequest.php:62
↓ 4 callersMethodsetCreatedBy
* 回答者 * * Generated from protobuf field <code>string created_by = 4;</code> * @param string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:177
↓ 4 callersMethodsetPassword
* 访问密码 * * Generated from protobuf field <code>string password = 2;</code> * @param string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/UserLoginRequest.php:93
↓ 3 callersMethodUserLogin
用户登录
part11/qa-project/clients/go/pb/qa_grpc.pb.go:46
↓ 3 callersMethodUserRegister
用户注册
part11/qa-project/clients/go/pb/qa_grpc.pb.go:50
↓ 3 callersFunctioncall
()
part2/super-self-demo/src/main.rs:36
↓ 3 callersFunctioncheck_image_type
根据文件名检查文件格式是否是PNG,JPEG,GIF三种类型的图片
part5/imgtool/src/utils.rs:6
↓ 3 callersMethodconsumer
消费点赞消息,并将数据持久化存储到mysql数据库对应的表中
part11/qa-project/crates/qa-svc/src/infrastructure/vote/user_vote.rs:267
↓ 3 callersMethoddeserialize
(deserializer: D)
part3/serde-custom/src/app.rs:34
↓ 3 callersMethodgetTitle
* 问题标题 * * Generated from protobuf field <code>string title = 2;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/QuestionEntity.php:113
↓ 3 callersMethodget_hash_key
(&self, target_type: &str)
part11/qa-project/crates/qa-svc/src/infrastructure/read_count/entity_read_count.rs:34
↓ 3 callersMethodis_voted
( &self, target_id: u64, target_type: &str, username: &str, )
part11/qa-project/crates/qa-svc/src/infrastructure/vote/user_vote.rs:187
↓ 3 callersMethodlayer
(&self, service: S)
part11/qa-project/crates/qa-svc/src/middleware/access.rs:16
↓ 3 callersMethodset
(&self, key: &str, user: &UserSessionEntity, seconds: u64)
part11/qa-project/crates/qa-svc/src/infrastructure/cache/user_session.rs:27
↓ 3 callersMethodsetTitle
* 问题标题 * * Generated from protobuf field <code>string title = 2;</code> * @param string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/QuestionEntity.php:125
↓ 3 callersMethodsetToken
* 登录成功返回的唯一标识token * * Generated from protobuf field <code>string token = 1;</code> * @param string $var * @return $this */
part11/qa-project/clients/php/App/Grpc/Qa/UserLoginReply.php:59
↓ 3 callersFunctionstr_to_bool
(s: &str)
part5/gen-table/src/main.rs:104
↓ 3 callersMethodwidth
(&self)
bilibili/struct-demo/src/main.rs:35
↓ 3 callersMethodwith_connect_timeout
(mut self, timeout: Duration)
part11/qa-project/crates/infras/src/xredis.rs:63
↓ 3 callersMethodwith_idle_timeout
(mut self, timeout: Duration)
part11/qa-project/crates/infras/src/xredis.rs:58
↓ 3 callersMethodwith_max_lifetime
(mut self, lifetime: Duration)
part11/qa-project/crates/infras/src/xredis.rs:53
↓ 2 callersMethodAddAnswer
添加问题回答
part11/qa-project/clients/go/pb/qa_grpc.pb.go:66
↓ 2 callersMethodAddQuestion
发表问题
part11/qa-project/clients/go/pb/qa_grpc.pb.go:54
↓ 2 callersMethodAnswerAgree
用户点赞回答和取消点赞
part11/qa-project/clients/go/pb/qa_grpc.pb.go:74
↓ 2 callersMethodAnswerDetail
查看答案详情
part11/qa-project/clients/go/pb/qa_grpc.pb.go:72
↓ 2 callersMethodAnswerList
回答列表
part11/qa-project/clients/go/pb/qa_grpc.pb.go:64
↓ 2 callersMethodDeleteAnswer
删除问题对应的回答
part11/qa-project/clients/go/pb/qa_grpc.pb.go:68
↓ 2 callersMethodDeleteQuestion
删除问题
part11/qa-project/clients/go/pb/qa_grpc.pb.go:56
↓ 2 callersMethodLatestQuestions
最新问题列表(采用下拉分页形式获取数据,按照id desc倒序)
part11/qa-project/clients/go/pb/qa_grpc.pb.go:62
↓ 2 callersMethodQuestionDetail
查看问题详情
part11/qa-project/clients/go/pb/qa_grpc.pb.go:60
↓ 2 callersMethodUpdateAnswer
修改回答
part11/qa-project/clients/go/pb/qa_grpc.pb.go:70
↓ 2 callersMethodUpdateQuestion
修改问题
part11/qa-project/clients/go/pb/qa_grpc.pb.go:58
↓ 2 callersMethodUserLogout
用户退出
part11/qa-project/clients/go/pb/qa_grpc.pb.go:48
↓ 2 callersMethodVerifyToken
验证登录的token是否有效
part11/qa-project/clients/go/pb/qa_grpc.pb.go:52
↓ 2 callersFunctionbackup_database
数据库备份操作
part6/mysql-dump-cron/src/mysql.rs:9
↓ 2 callersFunctionbuffer_and_print
( request_id: &str, prefix: &str, body: B, )
part11/qa-project/crates/gateway/src/middleware/request.rs:84
↓ 2 callersFunctioncamel_case
(s: &str)
part5/gen-table/src/engine.rs:49
↓ 2 callersMethodcheck_token
验证token是否有效,返回用户唯一标识openid
part11/qa-project/crates/qa-svc/src/application/qa.rs:67
↓ 2 callersFunctioncheck_user
检测用户是否存在
part8/points-svc/src/handlers/index.rs:197
↓ 2 callersFunctionclient
创建pulsar client
part8/points-svc/src/config/xpulsar.rs:14
↓ 2 callersFunctionclient
创建pulsar client
part11/qa-project/crates/qa-svc/src/config/xpulsar.rs:14
↓ 2 callersMethodclient
create pulsar client
part8/pulsar/pulsar-demo/src/xpulsar.rs:30
↓ 2 callersMethodclient
create redis client
part11/qa-project/crates/infras/src/xredis.rs:69
↓ 2 callersMethodcontent
(&self)
part11/qa-project/crates/infras/src/config.rs:38
↓ 2 callersMethoddecrypt
Decrypt a buffer with the given key and iv using AES (128/192256)/CBC/Pkcs encryption. data 表示密文base64格式的字符串 返回明文字符串和解密的错误信息
part11/qa-project/crates/infras/src/aes.rs:69
↓ 2 callersMethoddelete
(&self, id: u64, username: &str)
part11/qa-project/crates/qa-svc/src/infrastructure/persistence/answer.rs:59
↓ 2 callersMethodencrypt
Decrypt a buffer with the given key and iv using AES (128/192256)/CBC/Pkcs encryption. data 表示需要加密的字符串 返回的密文是将加密后的Vec<u8>转换为base64格式的字符串和对应的错误
part11/qa-project/crates/infras/src/aes.rs:37
↓ 2 callersFunctionfactorial
实现n的阶乘,也就是1*2*3一直乘以到n的结果
part1/my_criterion/src/lib.rs:2
↓ 2 callersMethodfetch_one
(&self, id: u64)
part11/qa-project/crates/qa-svc/src/infrastructure/persistence/answer.rs:96
↓ 2 callersFunctionfirst_word2
(s: &str)
bilibili/slice-demo/src/main.rs:53
↓ 2 callersFunctionfoo
()
part2/super-self-demo/src/main.rs:22
↓ 2 callersFunctiongen_in_placeholder
根据len生成对应的(?,?,...)占位符,主要用于mysql where in (?,?)操作
part11/qa-project/crates/infras/src/sql_utils.rs:2
↓ 2 callersMethodgetAgreeCount
* 点赞数,添加时默认为0 * * Generated from protobuf field <code>uint64 agree_count = 5;</code> * @return int|string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:191
↓ 2 callersMethodgetIsEnd
* 数据是否到底了 * * Generated from protobuf field <code>bool is_end = 6;</code> * @return bool */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerListReply.php:196
↓ 2 callersMethodgetLastId
* 上一次的question_id * * Generated from protobuf field <code>uint64 last_id = 2;</code> * @return int|string */
part11/qa-project/clients/php/App/Grpc/Qa/LatestQuestionsReply.php:82
↓ 2 callersMethodgetLimit
* 每页数据 * * Generated from protobuf field <code>uint64 limit = 3;</code> * @return int|string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerListRequest.php:123
↓ 2 callersMethodgetPassword
* 访问密码 * * Generated from protobuf field <code>string password = 2;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/UserLoginRequest.php:81
↓ 2 callersMethodgetQuestion
* Generated from protobuf field <code>.qa.QuestionEntity question = 1;</code> * @return \App\Grpc\Qa\QuestionEntity|null */
part11/qa-project/clients/php/App/Grpc/Qa/QuestionDetailReply.php:42
↓ 2 callersMethodgetQuestionId
* 问题id * * Generated from protobuf field <code>uint64 question_id = 2;</code> * @return int|string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerEntity.php:113
↓ 2 callersMethodgetReason
* 操作提示信息 * * Generated from protobuf field <code>string reason = 2;</code> * @return string */
part11/qa-project/clients/php/App/Grpc/Qa/AnswerAgreeReply.php:93
↓ 2 callersMethodget_columns
( &self, pool: &sqlx::MySqlPool, table: &str, )
part5/gen-table/src/engine.rs:192
↓ 2 callersFunctionget_header
get header by key
part11/qa-project/crates/gateway/src/utils/header.rs:4
↓ 2 callersFunctionget_type
get rust type by mysql type
part5/gen-table/src/sql_type.rs:55
↓ 2 callersFunctionhello
(name: &str)
bilibili/func-demo/src/main.rs:16
↓ 2 callersMethodincr
(&self, data: &EntityReadCountData)
part11/qa-project/crates/qa-svc/src/infrastructure/read_count/entity_read_count.rs:88
↓ 2 callersMethodinit_pool
由于redis client和redis cluster client创建pool只是build的client不一样 所以这里可以采用泛型方法创建pool,这个泛型参数T满足ManageConnection trait特征就可以
part11/qa-project/crates/infras/src/xredis.rs:115
↓ 2 callersMethodinit_pool
由于redis client和redis cluster client创建pool只是build的client不一样 所以这里可以采用泛型方法创建pool,这个泛型参数T满足ManageConnection trait特征就可以
part7/article-svc/src/infras/xredis.rs:116
↓ 2 callersMethodinit_pool
由于redis client和redis cluster client创建pool只是build的client不一样 所以这里可以采用泛型方法创建pool,这个泛型参数T满足ManageConnection trait特征就可以
part7/redis-demo/src/xredis.rs:115
↓ 2 callersFunctionlargest
(list: &[i32])
bilibili/largest-demo/src/main.rs:1
↓ 2 callersMethodlevel
(&self)
bilibili/lifetimes-demo/src/main.rs:13
↓ 2 callersMethodload
(&mut self)
part8/points-svc/src/infras/config.rs:30
↓ 2 callersFunctionmax
求一个包含i32类型元素的切片中最大值
part2/my-lib/src/lib.rs:2
↓ 2 callersFunctionnew_read_count_repo
创建一个ReadCountRepo实例对象
part11/qa-project/crates/qa-svc/src/infrastructure/read_count/entity_read_count.rs:15
↓ 2 callersFunctionnew_vote_repo
( mysql_pool: sqlx::MySqlPool, pulsar_client: Pulsar<TokioExecutor>, )
part11/qa-project/crates/qa-svc/src/infrastructure/vote/user_vote.rs:18
↓ 2 callersFunctionnotify
(item: &impl Summary)
bilibili/trait-demo/src/main.rs:54
next →1–100 of 1,131, ranked by callers