Struct krill::commons::eventsourcing::Key
pub struct Key { /* private fields */ }
Expand description
Represents the key used in KVx. Consists of a scope
of type Scope
and
a name
of type SegmentBuf
.
Implementations§
§impl Key
impl Key
pub fn new_scoped(scope: Scope, name: impl Into<SegmentBuf>) -> Key
pub fn new_scoped(scope: Scope, name: impl Into<SegmentBuf>) -> Key
pub fn new_global(name: impl Into<SegmentBuf>) -> Key
pub fn new_global(name: impl Into<SegmentBuf>) -> Key
pub fn with_sub_scope(&self, sub_scope: impl Into<SegmentBuf>) -> Key
pub fn with_sub_scope(&self, sub_scope: impl Into<SegmentBuf>) -> Key
pub fn add_sub_scope(&mut self, sub_scope: impl Into<SegmentBuf>)
pub fn add_sub_scope(&mut self, sub_scope: impl Into<SegmentBuf>)
Add a Segment
to the end of the scope of the key.
pub fn with_super_scope(&self, super_scope: impl Into<SegmentBuf>) -> Key
pub fn with_super_scope(&self, super_scope: impl Into<SegmentBuf>) -> Key
pub fn add_super_scope(&mut self, super_scope: impl Into<SegmentBuf>)
pub fn add_super_scope(&mut self, super_scope: impl Into<SegmentBuf>)
Add a Segment
to the front of the scope of the key.
Trait Implementations§
source§impl From<&PendingTask> for Key
impl From<&PendingTask> for Key
source§fn from(p: &PendingTask) -> Key
fn from(p: &PendingTask) -> Key
Converts to this type from the input type.
source§impl From<&RunningTask> for Key
impl From<&RunningTask> for Key
source§fn from(p: &RunningTask) -> Key
fn from(p: &RunningTask) -> Key
Converts to this type from the input type.
§impl Ord for Key
impl Ord for Key
§impl PartialOrd for Key
impl PartialOrd for Key
§fn partial_cmp(&self, other: &Key) -> Option<Ordering>
fn partial_cmp(&self, other: &Key) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Key
impl StructuralEq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Text for Twhere
T: Display,
impl<T> Text for Twhere
T: Display,
source§fn write_escaped(
&self,
mode: TextEscape,
target: &mut impl Write
) -> Result<(), Error>
fn write_escaped( &self, mode: TextEscape, target: &mut impl Write ) -> Result<(), Error>
Write text escaped for the given mode to
target
.