pub struct BrainEventKind(/* private fields */);Expand description
A brain event kind: .-separated segments of [a-z0-9_], such as
document.revision.landed.
Implementations§
Source§impl BrainEventKind
impl BrainEventKind
pub const REVISION_LANDED: &'static str = "document.revision.landed"
pub const COMMENT_RESOLVED: &'static str = "document.comment.resolved"
pub const FACT_ENTERED: &'static str = "brain.fact.entered"
pub const SESSION_TURN_CLOSED: &'static str = "session.turn.closed"
pub fn new(value: impl Into<String>) -> Result<Self, BrainEventKindError>
pub fn revision_landed() -> Self
pub fn comment_resolved() -> Self
pub fn fact_entered() -> Self
pub fn session_turn_closed() -> Self
pub const fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for BrainEventKind
impl Clone for BrainEventKind
Source§impl Debug for BrainEventKind
impl Debug for BrainEventKind
Source§impl<'de> Deserialize<'de> for BrainEventKind
impl<'de> Deserialize<'de> for BrainEventKind
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BrainEventKind
impl Display for BrainEventKind
impl Eq for BrainEventKind
Source§impl FromStr for BrainEventKind
impl FromStr for BrainEventKind
Source§impl Hash for BrainEventKind
impl Hash for BrainEventKind
Source§impl JsonSchema for BrainEventKind
impl JsonSchema for BrainEventKind
Source§fn json_schema(_generator: &mut SchemaGenerator) -> Schema
fn json_schema(_generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for BrainEventKind
impl Ord for BrainEventKind
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for BrainEventKind
impl PartialEq for BrainEventKind
Source§impl PartialOrd for BrainEventKind
impl PartialOrd for BrainEventKind
Source§impl Serialize for BrainEventKind
impl Serialize for BrainEventKind
impl StructuralPartialEq for BrainEventKind
Auto Trait Implementations§
impl Forget for BrainEventKind
impl Freeze for BrainEventKind
impl RefUnwindSafe for BrainEventKind
impl Send for BrainEventKind
impl Sync for BrainEventKind
impl Unpin for BrainEventKind
impl UnsafeUnpin for BrainEventKind
impl UnwindSafe for BrainEventKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more