Struct fluvio_sc_schema::store::MetadataStoreObject
source · pub struct MetadataStoreObject<S, C>where
S: Spec,
C: MetadataItem,{
pub spec: S,
pub status: <S as Spec>::Status,
pub key: <S as Spec>::IndexKey,
pub ctx: MetadataContext<C>,
}
Fields§
§spec: S
§status: <S as Spec>::Status
§key: <S as Spec>::IndexKey
§ctx: MetadataContext<C>
Implementations§
source§impl<S, C> MetadataStoreObject<S, C>
impl<S, C> MetadataStoreObject<S, C>
pub fn new( key: impl Into<<S as Spec>::IndexKey>, spec: S, status: <S as Spec>::Status ) -> MetadataStoreObject<S, C>
pub fn new_with_context( key: impl Into<<S as Spec>::IndexKey>, spec: S, ctx: MetadataContext<C> ) -> MetadataStoreObject<S, C>
pub fn with_spec(
key: impl Into<<S as Spec>::IndexKey>,
spec: S
) -> MetadataStoreObject<S, C>where
C: Default,
pub fn with_key( key: impl Into<<S as Spec>::IndexKey> ) -> MetadataStoreObject<S, C>
pub fn with_context( self, ctx: impl Into<MetadataContext<C>> ) -> MetadataStoreObject<S, C>
pub fn key(&self) -> &<S as Spec>::IndexKey
pub fn key_owned(&self) -> <S as Spec>::IndexKey
pub fn my_key(self) -> <S as Spec>::IndexKey
pub fn spec(&self) -> &S
pub fn set_spec(&mut self, spec: S)
pub fn status(&self) -> &<S as Spec>::Status
pub fn set_status(&mut self, status: <S as Spec>::Status)
pub fn ctx(&self) -> &MetadataContext<C>
pub fn ctx_mut(&mut self) -> &mut MetadataContext<C>
pub fn ctx_owned(&self) -> MetadataContext<C>
pub fn set_ctx(&mut self, ctx: MetadataContext<C>)
pub fn parts( self ) -> (<S as Spec>::IndexKey, S, <S as Spec>::Status, MetadataContext<C>)
sourcepub fn is_owned(&self, uid: &<C as MetadataItem>::UId) -> bool
pub fn is_owned(&self, uid: &<C as MetadataItem>::UId) -> bool
check if metadata is owned by other
sourcepub async fn childrens<T>(
&self,
child_stores: &LocalStore<T, C>
) -> Vec<MetadataStoreObject<T, C>>where
T: Spec,
pub async fn childrens<T>(
&self,
child_stores: &LocalStore<T, C>
) -> Vec<MetadataStoreObject<T, C>>where
T: Spec,
find children of this object
pub fn is_newer(&self, another: &MetadataStoreObject<S, C>) -> bool
source§impl<S, C> MetadataStoreObject<S, C>where
S: Spec,
C: MetadataRevExtension,
impl<S, C> MetadataStoreObject<S, C>where
S: Spec,
C: MetadataRevExtension,
pub fn next_rev(&self) -> MetadataStoreObject<S, C>
Trait Implementations§
source§impl<S, C> Clone for MetadataStoreObject<S, C>
impl<S, C> Clone for MetadataStoreObject<S, C>
source§fn clone(&self) -> MetadataStoreObject<S, C>
fn clone(&self) -> MetadataStoreObject<S, C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S, C> Debug for MetadataStoreObject<S, C>
impl<S, C> Debug for MetadataStoreObject<S, C>
source§impl<S, C> DualDiff for MetadataStoreObject<S, C>
impl<S, C> DualDiff for MetadataStoreObject<S, C>
source§fn diff(&self, new_value: &MetadataStoreObject<S, C>) -> ChangeFlag
fn diff(&self, new_value: &MetadataStoreObject<S, C>) -> ChangeFlag
compute difference, in our case we take account of version as well
source§impl<S, C> From<MetadataStoreObject<S, C>> for Metadata<S>
impl<S, C> From<MetadataStoreObject<S, C>> for Metadata<S>
source§fn from(meta: MetadataStoreObject<S, C>) -> Self
fn from(meta: MetadataStoreObject<S, C>) -> Self
Converts to this type from the input type.
source§impl<S, C> PartialEq for MetadataStoreObject<S, C>
impl<S, C> PartialEq for MetadataStoreObject<S, C>
source§fn eq(&self, other: &MetadataStoreObject<S, C>) -> bool
fn eq(&self, other: &MetadataStoreObject<S, C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<S, C> TryFrom<Metadata<S>> for MetadataStoreObject<S, C>
impl<S, C> TryFrom<Metadata<S>> for MetadataStoreObject<S, C>
impl<S, C> StructuralPartialEq for MetadataStoreObject<S, C>where
S: Spec,
C: MetadataItem,
Auto Trait Implementations§
impl<S, C> Freeze for MetadataStoreObject<S, C>
impl<S, C> RefUnwindSafe for MetadataStoreObject<S, C>where
S: RefUnwindSafe,
<S as Spec>::Status: RefUnwindSafe,
<S as Spec>::IndexKey: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for MetadataStoreObject<S, C>
impl<S, C> Sync for MetadataStoreObject<S, C>
impl<S, C> Unpin for MetadataStoreObject<S, C>
impl<S, C> UnwindSafe for MetadataStoreObject<S, C>where
S: UnwindSafe,
<S as Spec>::Status: UnwindSafe,
<S as Spec>::IndexKey: UnwindSafe,
C: UnwindSafe,
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