pub struct MetaData {
pub name: SclName,
pub resource_version: ResourceVersion,
pub deletion_mark: Option<DeletionMark>,
}Fields§
§name: SclName§resource_version: ResourceVersion§deletion_mark: Option<DeletionMark>Will be set by the SCL API after it has received a delete request. Controllers will clean up related resources before the actual delete is performed.
Implementations§
Source§impl MetaData
impl MetaData
pub fn new(name: SclName) -> Self
Sourcepub fn may_be_deleted(&self) -> bool
pub fn may_be_deleted(&self) -> bool
Indicates whether a safe deletion (without remaining dangling references elsewhere) should be possible.
Sourcepub fn may_be_referenced(&self) -> bool
pub fn may_be_referenced(&self) -> bool
Indicates whether the object may be referenced by others. Currently, this is synonymous with the absence of a deletion mark.
Sourcepub fn validate_fields_before_create(&self) -> Result<()>
pub fn validate_fields_before_create(&self) -> Result<()>
Checks if all fields are legal initial fields. Should be called before a create operation.
Sourcepub fn validate_fields_before_regular_update(
current_db_state: &Self,
proposed_new_state: &Self,
) -> Result<()>
pub fn validate_fields_before_regular_update( current_db_state: &Self, proposed_new_state: &Self, ) -> Result<()>
Checks if a proposed updated is valid. Should be called before a regular (not related to finalizers / deletion) update.
Sourcepub fn validate_fields_before_finalizer_update(
current_db_state: &Self,
proposed_new_state: &Self,
) -> Result<()>
pub fn validate_fields_before_finalizer_update( current_db_state: &Self, proposed_new_state: &Self, ) -> Result<()>
Checks if a proposed updated is valid. Should be called before a finalizer update. Does not check SclObject specific details related to FinalizerIds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetaData
impl<'de> Deserialize<'de> for MetaData
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
Source§impl Ord for MetaData
impl Ord for MetaData
Source§impl PartialOrd for MetaData
impl PartialOrd for MetaData
impl Eq for MetaData
impl StructuralPartialEq for MetaData
Auto Trait Implementations§
impl Freeze for MetaData
impl RefUnwindSafe for MetaData
impl Send for MetaData
impl Sync for MetaData
impl Unpin for MetaData
impl UnwindSafe for MetaData
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.