Crates.io | xmtv_api |
lib.rs | xmtv_api |
version | 0.1.7 |
source | src |
created_at | 2024-08-12 03:47:44.282427 |
updated_at | 2024-09-16 00:54:55.382645 |
description | 一个封装好的自用库 |
homepage | |
repository | |
max_upload_size | |
id | 1333837 |
size | 13,982 |
内部实现了sql库的链接,按照日期划分,每日sql过期
其中struct的定义
pub struct Videoplay{
pub name:String,
pub url:String
}
pub struct Video{
pub title:String,
pub range:Vec
}
pub struct VideoUrl{
pub title:String,
pub name:String,
pub url:String,
pub time:u32
}
默认保存位置const DB:&str = "urls.db";
pub fn update()->Result<()> 更新db
pub fn get_exact()->Result<Vec
pub fn get()->Result<Vec
impl Videos{
pub fn get(&mut self)->Result<()>
pub fn random(&self)->Result<Vec
pub fn index(&self, index: usize)->Video
}