mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-06 13:27:43 +00:00
14 lines
336 B
Rust
14 lines
336 B
Rust
use s3s::dto::{ObjectLockConfiguration, ObjectLockEnabled};
|
|
|
|
pub trait ObjectLockApi {
|
|
fn enabled(&self) -> bool;
|
|
}
|
|
|
|
impl ObjectLockApi for ObjectLockConfiguration {
|
|
fn enabled(&self) -> bool {
|
|
self.object_lock_enabled
|
|
.as_ref()
|
|
.is_some_and(|v| v.as_str() == ObjectLockEnabled::ENABLED)
|
|
}
|
|
}
|