doc:补充一些函数的文档。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
pub mod hail;
|
||||
|
||||
pub mod uuid {
|
||||
/// 生成一个UUID v4字符串。
|
||||
pub fn new() -> Box<String> {
|
||||
Box::from(uuid::Uuid::new_v4().to_string())
|
||||
}
|
||||
@@ -8,6 +9,8 @@ pub mod uuid {
|
||||
|
||||
pub mod short_uuid {
|
||||
const STR_SRC: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
|
||||
/// 生成一个基于UUID v4的短UUID字符串。
|
||||
pub fn new(length: i16) -> Box<String> {
|
||||
let length = if length < 2 {
|
||||
2
|
||||
|
Reference in New Issue
Block a user