Struct fluvio_sc_schema::store::MetadataStoreObject
[−]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
impl<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>)
pub 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
pub 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
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
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,
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,
fn 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
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,
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,
impl<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>,
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
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>
) -> DerivedStreamControlData
fn from(
mso: MetadataStoreObject<DerivedStreamSpec, C>
) -> DerivedStreamControlData
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: MetadataStoreObject<PartitionSpec, C>) -> Replica
fn from(item: MetadataStoreObject<PartitionSpec, C>) -> Replica
Converts to this type from the input type.
sourceimpl<S, C> From<MetadataStoreObject<S, C>> for Metadata<S> where
S: Spec + Encoder + Decoder,
S::IndexKey: ToString,
S::Status: Encoder + Decoder,
C: MetadataItem,
impl<S, C> From<MetadataStoreObject<S, C>> for Metadata<S> where
S: Spec + Encoder + Decoder,
S::IndexKey: ToString,
S::Status: Encoder + Decoder,
C: MetadataItem,
sourcefn from(meta: MetadataStoreObject<S, C>) -> Self
fn from(meta: MetadataStoreObject<S, 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>) -> SmartModule
fn from(mso: MetadataStoreObject<SmartModuleSpec, C>) -> SmartModule
Converts to this type from the input type.
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>,
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>,
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 ==
. Read more
fn ne(&self, other: &MetadataStoreObject<S, C>) -> bool
fn ne(&self, other: &MetadataStoreObject<S, C>) -> bool
This method tests for !=
.
sourceimpl<C> PartitionMd<C> for MetadataStoreObject<PartitionSpec, C> where
C: MetadataItem,
impl<C> PartitionMd<C> for MetadataStoreObject<PartitionSpec, C> where
C: MetadataItem,
sourcefn with_replicas(
key: ReplicaKey,
replicas: Vec<i32, Global>
) -> MetadataStoreObject<PartitionSpec, C>
fn with_replicas(
key: ReplicaKey,
replicas: Vec<i32, Global>
) -> MetadataStoreObject<PartitionSpec, C>
create new partition with replica map. first element of replicas is leader
fn quick<S>(
partition: ((S, i32), Vec<i32, Global>)
) -> MetadataStoreObject<PartitionSpec, C> where
S: Into<String>,
sourceimpl<C> SpuMd<C> for MetadataStoreObject<SpuSpec, C> where
C: MetadataItem,
impl<C> SpuMd<C> for MetadataStoreObject<SpuSpec, C> where
C: MetadataItem,
sourceimpl<C> TopicMd<C> for MetadataStoreObject<TopicSpec, C> where
C: MetadataItem + Send + Sync,
impl<C> TopicMd<C> for MetadataStoreObject<TopicSpec, C> where
C: MetadataItem + Send + Sync,
sourcefn create_new_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
partition_store: &'life1 LocalStore<PartitionSpec, C>
) -> Pin<Box<dyn Future<Output = Vec<MetadataStoreObject<PartitionSpec, C>, Global>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MetadataStoreObject<TopicSpec, C>: 'async_trait,
fn create_new_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
partition_store: &'life1 LocalStore<PartitionSpec, C>
) -> Pin<Box<dyn Future<Output = Vec<MetadataStoreObject<PartitionSpec, C>, Global>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MetadataStoreObject<TopicSpec, C>: 'async_trait,
create new partitions from my replica map if it doesn’t exists
sourceimpl<S, C> TryFrom<Metadata<S>> for MetadataStoreObject<S, C> where
S: Spec + Encoder + Decoder,
S::Status: Encoder + Decoder,
C: MetadataItem,
<S as Spec>::IndexKey: TryFrom<String>,
<<S as Spec>::IndexKey as TryFrom<String>>::Error: Display,
impl<S, C> TryFrom<Metadata<S>> for MetadataStoreObject<S, C> where
S: Spec + Encoder + Decoder,
S::Status: Encoder + Decoder,
C: MetadataItem,
<S as Spec>::IndexKey: TryFrom<String>,
<<S as Spec>::IndexKey as TryFrom<String>>::Error: Display,
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