pub struct Container {
pub id: Option<ContainerId>,
pub owner_id: OwnerId,
pub basic_acl: u32,
pub name: String,
pub creation: Option<DateTime<Utc>>,
pub version: Option<Version>,
pub attributes: Attributes,
pub placement_policy: PlacementPolicy,
}
Expand description
Represents a storage container in NeoFS
Fields§
§id: Option<ContainerId>
Container ID
owner_id: OwnerId
Owner ID of the container
basic_acl: u32
Basic ACL
name: String
Container name
creation: Option<DateTime<Utc>>
Container creation timestamp
version: Option<Version>
Container version
attributes: Attributes
Container attributes
placement_policy: PlacementPolicy
Placement policy for the container
Implementations§
Source§impl Container
impl Container
Sourcepub fn new(id: ContainerId, owner_id: OwnerId) -> Self
pub fn new(id: ContainerId, owner_id: OwnerId) -> Self
Creates a new container with the given ID and owner ID
Sourcepub fn with_basic_acl(self, acl: u32) -> Self
pub fn with_basic_acl(self, acl: u32) -> Self
Sets the basic ACL for the container
Sourcepub fn with_creation(self, creation: DateTime<Utc>) -> Self
pub fn with_creation(self, creation: DateTime<Utc>) -> Self
Sets the container creation timestamp
Sourcepub fn with_version(self, version: Version) -> Self
pub fn with_version(self, version: Version) -> Self
Sets the container version
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Container
impl<'de> Deserialize<'de> for Container
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more