jmap_client/blob/
mod.rs

1/*
2 * Copyright Stalwart Labs Ltd. See the COPYING
3 * file at the top-level directory of this distribution.
4 *
5 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 * https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 * <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
8 * option. This file may not be copied, modified, or distributed
9 * except according to those terms.
10 */
11
12use crate::core::session::URLParser;
13
14pub mod copy;
15pub mod download;
16pub mod helpers;
17pub mod upload;
18
19pub enum URLParameter {
20    AccountId,
21    BlobId,
22    Name,
23    Type,
24}
25
26impl URLParser for URLParameter {
27    fn parse(value: &str) -> Option<Self> {
28        match value {
29            "accountId" => Some(URLParameter::AccountId),
30            "blobId" => Some(URLParameter::BlobId),
31            "name" => Some(URLParameter::Name),
32            "type" => Some(URLParameter::Type),
33            _ => None,
34        }
35    }
36}