rustfs_rsc/client/
response.rs

1use std::collections::HashMap;
2
3#[derive(Debug, Clone)]
4pub struct ObjectStat {
5    pub(crate) bucket_name: String,
6    pub(crate) object_name: String,
7    pub(crate) last_modified: String,
8    pub(crate) etag: String,
9    pub(crate) content_type: String,
10    pub(crate) version_id: String,
11    pub(crate) size: usize,
12    pub(crate) metadata: HashMap<String, String>,
13}
14
15impl ObjectStat {
16    pub fn bucket_name(&self) -> &str {
17        self.bucket_name.as_ref()
18    }
19
20    pub fn object_name(&self) -> &str {
21        self.object_name.as_ref()
22    }
23
24    pub fn last_modified(&self) -> &str {
25        self.last_modified.as_ref()
26    }
27
28    pub fn etag(&self) -> &str {
29        self.etag.as_ref()
30    }
31
32    pub fn content_type(&self) -> &str {
33        self.content_type.as_ref()
34    }
35
36    pub fn version_id(&self) -> &str {
37        self.version_id.as_ref()
38    }
39
40    pub fn size(&self) -> usize {
41        self.size
42    }
43
44    pub fn metadata(&self) -> &HashMap<String, String> {
45        &self.metadata
46    }
47}