minio_rsc/client/
response.rs1use std::collections::HashMap;
2
3#[derive(Debug, Clone)]
5pub struct ObjectStat {
6 pub(crate) bucket_name: String,
7 pub(crate) object_name: String,
8 pub(crate) last_modified: String,
9 pub(crate) etag: String,
10 pub(crate) content_type: String,
11 pub(crate) version_id: String,
12 pub(crate) size: usize,
13 pub(crate) metadata: HashMap<String, String>,
14}
15
16impl ObjectStat {
17 pub fn bucket_name(&self) -> &str {
19 self.bucket_name.as_str()
20 }
21
22 pub fn object_name(&self) -> &str {
24 self.object_name.as_str()
25 }
26
27 pub fn last_modified(&self) -> &str {
29 self.last_modified.as_str()
30 }
31
32 pub fn etag(&self) -> &str {
34 self.etag.as_str()
35 }
36
37 pub fn content_type(&self) -> &str {
39 self.content_type.as_str()
40 }
41
42 pub fn version_id(&self) -> &str {
44 self.version_id.as_str()
45 }
46
47 pub fn size(&self) -> usize {
49 self.size
50 }
51
52 pub fn metadata(&self) -> &HashMap<String, String> {
54 &self.metadata
55 }
56}