| Crates.io | rlist_vfs |
| lib.rs | rlist_vfs |
| version | 0.1.4 |
| created_at | 2024-03-24 18:14:18.358217+00 |
| updated_at | 2024-04-24 05:19:54.449297+00 |
| description | Virtual File System for rList |
| homepage | |
| repository | https://github.com/rList-org/rlist-core.git |
| max_upload_size | |
| id | 1184609 |
| size | 38,685 |
Basically, it is used to implement the driver for rList and get the Whell as the server state.
First, define the configuration struct, like this:
#[derive(Debug, Deserialize)]
pub struct OnedriveConfig {
/// The refresh token for the onedrive account.
/// *For further information, please refer to the official documentation of Microsoft OAuth 2.0 authorization flow.*
pub refresh_token: String,
/// The client id for the application.
/// You can get it from the Azure portal with the client secret.
pub client_id: String,
/// The client secret for the application.
/// You can get it from the Azure portal with the client id.
pub client_secret: String,
}
You should make sure that the struct can be loaded from the config file.
Besides, you should make sure that there is no driver_name field in the configuration struct, because it is preserved for identifying the driver.
Don't worry about the driver_name field. If you add it into the config struct, there should be a compile error.