[]Struct fluvio::metadata::store::MetadataStoreObject

pub struct MetadataStoreObject<S, C> where
    C: MetadataItem,
    S: Spec
{ pub spec: S, pub status: <S as Spec>::Status, pub key: <S as Spec>::IndexKey, pub ctx: MetadataContext<C>, }

Fields

spec: Sstatus: <S as Spec>::Statuskey: <S as Spec>::IndexKeyctx: MetadataContext<C>

Implementations

impl<S, C> MetadataStoreObject<S, C> where
    C: MetadataItem,
    S: Spec,
    <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
    C: Default,
    J: Into<<S as Spec>::IndexKey>, 

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

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

find children of this object

pub fn is_newer(&self, another: &MetadataStoreObject<S, C>) -> bool

Trait Implementations

impl<S, C> Clone for MetadataStoreObject<S, C> where
    C: Clone + MetadataItem,
    S: Clone + Spec,
    <S as Spec>::Status: Clone,
    <S as Spec>::IndexKey: Clone

impl<S, C> Debug for MetadataStoreObject<S, C> where
    C: Debug + MetadataItem,
    S: Debug + Spec,
    <S as Spec>::Status: Debug,
    <S as Spec>::IndexKey: Debug

impl<S, C> DualDiff for MetadataStoreObject<S, C> where
    C: MetadataItem + PartialEq<C>,
    S: Spec

pub fn diff(&self, another: &MetadataStoreObject<S, C>) -> ChangeFlag

compute difference, in our case we take account of version as well

impl<C> From<MetadataStoreObject<PartitionSpec, C>> for Replica where
    C: MetadataItem

impl<S, C> From<MetadataStoreObject<S, C>> for Metadata<S> where
    C: MetadataItem,
    S: Spec + Encoder + Decoder,
    <S as Spec>::IndexKey: ToString,
    <S as Spec>::Status: Encoder,
    <S as Spec>::Status: Decoder
[src]

impl<S, C> Into<(<S as Spec>::IndexKey, S, <S as Spec>::Status)> for MetadataStoreObject<S, C> where
    C: MetadataItem,
    S: Spec

impl<S, C> PartialEq<MetadataStoreObject<S, C>> for MetadataStoreObject<S, C> where
    C: PartialEq<C> + MetadataItem,
    S: PartialEq<S> + Spec,
    <S as Spec>::Status: PartialEq<<S as Spec>::Status>,
    <S as Spec>::IndexKey: PartialEq<<S as Spec>::IndexKey>, 

impl<C> PartitionMd<C> for MetadataStoreObject<PartitionSpec, C> where
    C: MetadataItem

pub fn with_replicas(
    key: ReplicaKey,
    replicas: Vec<i32, Global>
) -> MetadataStoreObject<PartitionSpec, C>

create new partition with replica map. first element of replicas is leader

impl<C> SpuMd<C> for MetadataStoreObject<SpuSpec, C> where
    C: MetadataItem

impl<S, C> StructuralPartialEq for MetadataStoreObject<S, C> where
    C: MetadataItem,
    S: Spec

impl<C> TopicMd<C> for MetadataStoreObject<TopicSpec, C> where
    C: MetadataItem + Send + Sync

pub 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>> + 'async_trait + Send, 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 from partition store

impl<S, C> TryFrom<Metadata<S>> for MetadataStoreObject<S, C> where
    C: MetadataItem,
    S: Spec + Encoder + Decoder,
    <S as Spec>::Status: Encoder,
    <S as Spec>::Status: Decoder,
    <S as Spec>::IndexKey: TryFrom<String>,
    <<S as Spec>::IndexKey as TryFrom<String>>::Error: Display
[src]

type Error = Error

The type returned in the event of a conversion error.

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
[src]

impl<S, C> Send for MetadataStoreObject<S, C> where
    C: Send,
    S: Send,
    <S as Spec>::IndexKey: Send,
    <S as Spec>::Status: Send
[src]

impl<S, C> Sync for MetadataStoreObject<S, C> where
    C: Sync,
    S: Sync,
    <S as Spec>::IndexKey: Sync,
    <S as Spec>::Status: Sync
[src]

impl<S, C> Unpin for MetadataStoreObject<S, C> where
    C: Unpin,
    S: Unpin,
    <S as Spec>::IndexKey: Unpin,
    <S as Spec>::Status: Unpin
[src]

impl<S, C> UnwindSafe for MetadataStoreObject<S, C> where
    C: UnwindSafe,
    S: UnwindSafe,
    <S as Spec>::IndexKey: UnwindSafe,
    <S as Spec>::Status: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]