#[repr(u8)]pub enum SubstrateKind {
Note = 0,
Entity = 1,
Event = 2,
}Expand description
The 3 substrate types in khive OSS.
- Note: temporal-referential records (observations, insights, decisions)
- Entity: graph nodes with properties and typed links
- Event: universal system log — every verb execution produces one
Variants§
Implementations§
Source§impl SubstrateKind
impl SubstrateKind
Sourcepub const ALL: [SubstrateKind; 3]
pub const ALL: [SubstrateKind; 3]
All substrate kinds in discriminant order.
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Return the canonical lowercase name for this substrate, as stored on the wire.
Sourcepub const fn from_u8(v: u8) -> Option<SubstrateKind>
pub const fn from_u8(v: u8) -> Option<SubstrateKind>
Construct a SubstrateKind from its u8 discriminant, or None if out of range.
Trait Implementations§
Source§impl Clone for SubstrateKind
impl Clone for SubstrateKind
Source§fn clone(&self) -> SubstrateKind
fn clone(&self) -> SubstrateKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SubstrateKind
Source§impl Debug for SubstrateKind
impl Debug for SubstrateKind
Source§impl<'de> Deserialize<'de> for SubstrateKind
impl<'de> Deserialize<'de> for SubstrateKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubstrateKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubstrateKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SubstrateKind
impl Display for SubstrateKind
impl Eq for SubstrateKind
Source§impl FromStr for SubstrateKind
impl FromStr for SubstrateKind
Source§type Err = UnknownVariant
type Err = UnknownVariant
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<SubstrateKind, <SubstrateKind as FromStr>::Err>
fn from_str(s: &str) -> Result<SubstrateKind, <SubstrateKind as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for SubstrateKind
impl Hash for SubstrateKind
Source§impl Ord for SubstrateKind
impl Ord for SubstrateKind
Source§fn cmp(&self, other: &SubstrateKind) -> Ordering
fn cmp(&self, other: &SubstrateKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SubstrateKind
impl PartialEq for SubstrateKind
Source§fn eq(&self, other: &SubstrateKind) -> bool
fn eq(&self, other: &SubstrateKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SubstrateKind
impl PartialOrd for SubstrateKind
Source§impl Serialize for SubstrateKind
impl Serialize for SubstrateKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SubstrateKind
Auto Trait Implementations§
impl Freeze for SubstrateKind
impl RefUnwindSafe for SubstrateKind
impl Send for SubstrateKind
impl Sync for SubstrateKind
impl Unpin for SubstrateKind
impl UnsafeUnpin for SubstrateKind
impl UnwindSafe for SubstrateKind
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