pub struct MetaItem<S>where
S: StoreSpec,{
pub spec: S,
pub status: S::Status,
pub key: S::Key,
pub ctx: MetaItemContext,
}
Expand description
Metadata object. Used to be KVObject int sc-core
Fields§
§spec: S
§status: S::Status
§key: S::Key
§ctx: MetaItemContext
Implementations§
source§impl<S> MetaItem<S>where
S: StoreSpec,
impl<S> MetaItem<S>where S: StoreSpec,
pub fn new<J>(key: J, spec: S, status: S::Status, ctx: MetaItemContext) -> Selfwhere J: Into<S::Key>,
pub fn with_ctx(self, ctx: MetaItemContext) -> Self
pub fn key(&self) -> &S::Key
pub fn key_owned(&self) -> S::Key
pub fn my_key(self) -> S::Key
pub fn spec(&self) -> &S
pub fn status(&self) -> &S::Status
pub fn set_status(&mut self, status: S::Status)
pub fn ctx(&self) -> &MetaItemContext
pub fn set_ctx(&mut self, ctx: MetaItemContext)
pub fn parts(self) -> (S::Key, S, MetaItemContext)
pub fn is_owned(&self, uid: &str) -> bool
pub fn with_spec<J>(key: J, spec: S) -> Selfwhere J: Into<S::Key>,
Trait Implementations§
source§impl<S> PartialEq<MetaItem<S>> for MetaItem<S>where
S: StoreSpec + PartialEq,
S::Status: PartialEq,
S::Key: PartialEq,
impl<S> PartialEq<MetaItem<S>> for MetaItem<S>where S: StoreSpec + PartialEq, S::Status: PartialEq, S::Key: PartialEq,
impl<S> Eq for MetaItem<S>where S: StoreSpec + Eq, S::Status: Eq, S::Key: Eq,
impl<S> StructuralEq for MetaItem<S>where S: StoreSpec,
impl<S> StructuralPartialEq for MetaItem<S>where S: StoreSpec,
Auto Trait Implementations§
impl<S> RefUnwindSafe for MetaItem<S>where S: RefUnwindSafe, <S as StoreSpec>::Key: RefUnwindSafe, <S as StoreSpec>::Status: RefUnwindSafe,
impl<S> Send for MetaItem<S>where S: Send, <S as StoreSpec>::Key: Send, <S as StoreSpec>::Status: Send,
impl<S> Sync for MetaItem<S>where S: Sync, <S as StoreSpec>::Key: Sync, <S as StoreSpec>::Status: Sync,
impl<S> Unpin for MetaItem<S>where S: Unpin, <S as StoreSpec>::Key: Unpin, <S as StoreSpec>::Status: Unpin,
impl<S> UnwindSafe for MetaItem<S>where S: UnwindSafe, <S as StoreSpec>::Key: UnwindSafe, <S as StoreSpec>::Status: 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