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
sourceimpl<S, C> MetadataStoreObject<S, C> where
S: Spec,
C: MetadataItem,
<S as Spec>::Status: Default,
impl<S, C> MetadataStoreObject<S, C> where
S: Spec,
C: MetadataItem,
<S as Spec>::Status: Default,
pub fn new<J>(
key: J,
spec: S,
status: <S as Spec>::Status
) -> MetadataStoreObject<S, C> where
J: Into<<S as Spec>::IndexKey>,
pub fn new_with_context<J>(
key: J,
spec: S,
ctx: MetadataContext<C>
) -> MetadataStoreObject<S, C> where
J: Into<<S as Spec>::IndexKey>,
pub fn with_spec<J>(key: J, spec: S) -> MetadataStoreObject<S, C> where
J: Into<<S as Spec>::IndexKey>,
C: Default,
pub fn with_key<J>(key: J) -> MetadataStoreObject<S, C> where
J: Into<<S as Spec>::IndexKey>,
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>, Global> where
T: Spec,
pub async fn childrens<T>(
&'_ self,
child_stores: &'_ LocalStore<T, C>
) -> Vec<MetadataStoreObject<T, C>, Global> where
T: Spec,
find children of this object
pub fn is_newer(&self, another: &MetadataStoreObject<S, C>) -> bool
sourceimpl<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
sourceimpl<S, C> Clone for MetadataStoreObject<S, C> where
S: Clone + Spec,
C: Clone + MetadataItem,
<S as Spec>::Status: Clone,
<S as Spec>::IndexKey: Clone,
impl<S, C> Clone for MetadataStoreObject<S, C> where
S: Clone + Spec,
C: Clone + MetadataItem,
<S as Spec>::Status: Clone,
<S as Spec>::IndexKey: Clone,
sourcefn clone(&self) -> MetadataStoreObject<S, C>
fn clone(&self) -> MetadataStoreObject<S, C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<S, C> Debug for MetadataStoreObject<S, C> where
S: Debug + Spec,
C: Debug + MetadataItem,
<S as Spec>::Status: Debug,
<S as Spec>::IndexKey: Debug,
impl<S, C> Debug for MetadataStoreObject<S, C> where
S: Debug + Spec,
C: Debug + MetadataItem,
<S as Spec>::Status: Debug,
<S as Spec>::IndexKey: Debug,
sourceimpl<S, C> DualDiff for MetadataStoreObject<S, C> where
S: Spec,
C: MetadataItem + PartialEq<C>,
impl<S, C> DualDiff for MetadataStoreObject<S, C> where
S: Spec,
C: MetadataItem + PartialEq<C>,
sourcefn 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
sourceimpl<C> From<MetadataStoreObject<DerivedStreamSpec, C>> for DerivedStreamControlData where
C: MetadataItem,
impl<C> From<MetadataStoreObject<DerivedStreamSpec, C>> for DerivedStreamControlData where
C: MetadataItem,
sourcefn from(mso: MetadataStoreObject<DerivedStreamSpec, C>) -> Self
fn from(mso: MetadataStoreObject<DerivedStreamSpec, C>) -> Self
Converts to this type from the input type.
sourceimpl<C> From<MetadataStoreObject<PartitionSpec, C>> for Replica where
C: MetadataItem,
impl<C> From<MetadataStoreObject<PartitionSpec, C>> for Replica where
C: MetadataItem,
sourcefn from(item: PartitionMetadata<C>) -> Self
fn from(item: PartitionMetadata<C>) -> Self
Converts to this type from the input type.
sourceimpl<C> From<MetadataStoreObject<SmartModuleSpec, C>> for SmartModule where
C: MetadataItem,
impl<C> From<MetadataStoreObject<SmartModuleSpec, C>> for SmartModule where
C: MetadataItem,
sourcefn from(mso: MetadataStoreObject<SmartModuleSpec, C>) -> Self
fn from(mso: MetadataStoreObject<SmartModuleSpec, C>) -> Self
Converts to this type from the input type.
sourceimpl<S, C> PartialEq<MetadataStoreObject<S, C>> for MetadataStoreObject<S, C> where
S: PartialEq<S> + Spec,
C: PartialEq<C> + MetadataItem,
<S as Spec>::Status: PartialEq<<S as Spec>::Status>,
<S as Spec>::IndexKey: PartialEq<<S as Spec>::IndexKey>,
impl<S, C> PartialEq<MetadataStoreObject<S, C>> for MetadataStoreObject<S, C> where
S: PartialEq<S> + Spec,
C: PartialEq<C> + MetadataItem,
<S as Spec>::Status: PartialEq<<S as Spec>::Status>,
<S as Spec>::IndexKey: PartialEq<<S as Spec>::IndexKey>,
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &MetadataStoreObject<S, C>) -> bool
fn ne(&self, other: &MetadataStoreObject<S, C>) -> bool
This method tests for !=
.
impl<S, C> StructuralPartialEq for MetadataStoreObject<S, C> where
S: Spec,
C: MetadataItem,
Auto Trait Implementations
impl<S, C> RefUnwindSafe for MetadataStoreObject<S, C> where
C: RefUnwindSafe,
S: RefUnwindSafe,
<S as Spec>::IndexKey: RefUnwindSafe,
<S as Spec>::Status: RefUnwindSafe,
impl<S, C> Send for MetadataStoreObject<S, C> where
C: Send,
S: Send,
<S as Spec>::IndexKey: Send,
<S as Spec>::Status: Send,
impl<S, C> Sync for MetadataStoreObject<S, C> where
C: Sync,
S: Sync,
<S as Spec>::IndexKey: Sync,
<S as Spec>::Status: Sync,
impl<S, C> Unpin for MetadataStoreObject<S, C> where
C: Unpin,
S: Unpin,
<S as Spec>::IndexKey: Unpin,
<S as Spec>::Status: Unpin,
impl<S, C> UnwindSafe for MetadataStoreObject<S, C> where
C: UnwindSafe,
S: UnwindSafe,
<S as Spec>::IndexKey: UnwindSafe,
<S as Spec>::Status: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more