Skip to main content

SopTrigger

Enum SopTrigger 

pub enum SopTrigger {
    Mqtt {
        topic: String,
        condition: Option<String>,
    },
    Webhook {
        path: String,
    },
    Cron {
        expression: String,
    },
    Peripheral {
        board: String,
        signal: String,
        condition: Option<String>,
    },
    Filesystem {
        path: String,
        events: Vec<FilesystemEventKind>,
        condition: Option<String>,
    },
    Calendar {
        calendar_source: String,
        calendar_ids: Vec<String>,
        condition: Option<String>,
    },
    Channel {
        channel: String,
        alias: Option<String>,
        condition: Option<String>,
    },
    Manual,
    Amqp {
        routing_key: String,
        condition: Option<String>,
    },
}
Expand description

What event can activate an SOP.

Variants§

§

Mqtt

MQTT message arrival. Live: delivered by the MQTT listener.

Fields

§topic: String

Topic filter. + matches one level, # matches the remaining levels.

§condition: Option<String>

Optional expression evaluated against the message payload; the run starts only when it holds.

§

Webhook

Inbound HTTP request. Defined and matched, but no live route feeds it.

Fields

§path: String

Request path matched exactly against the event path.

§

Cron

Time-based firing. Live: dispatched by the SOP maintenance tick (daemon / channel-start paths).

Fields

§expression: String

Cron expression evaluated over the run window.

§

Peripheral

Hardware signal. Defined and matched, but no peripheral listener feeds it.

Fields

§board: String

Board identifier the signal originates from.

§signal: String

Signal name on the board; matched as board/signal.

§condition: Option<String>

Optional expression evaluated against the signal payload.

§

Filesystem

Filesystem change. Live: delivered by the filesystem watcher.

Fields

§path: String

Path glob (*, **, ?); a bare directory matches anything under it.

§events: Vec<FilesystemEventKind>

Change kinds to match; empty matches every kind.

§condition: Option<String>

Optional expression evaluated against the change payload.

§

Calendar

Calendar event state. Defined and matched, but no poller feeds it live.

Fields

§calendar_source: String

Calendar source identifier the event originates from.

§calendar_ids: Vec<String>

Calendar IDs to scope to; empty matches all of the source’s calendars.

§condition: Option<String>

Optional expression evaluated against the calendar event payload.

§

Channel

Inbound message or forge/platform event on a configured channel (telegram, discord, slack, git, …). Live: delivered by the channel orchestrator when the channel’s SOP dispatch is enabled. The Git forge producer sets an event topic of the form <channel>.<alias>:<event_type> and puts event_type in the payload, so an authored condition filters forge events by type without a second trigger shape.

Fields

§channel: String

ChannelKind snake_case value naming the channel type.

§alias: Option<String>

Optional configured-instance alias; unset matches every instance.

§condition: Option<String>

Optional expression evaluated against the message payload.

§

Manual

Agent-initiated run via the sop_execute tool. Not an external fan-in.

§

Amqp

AMQP delivery. Live: delivered by the AMQP consumer in a SOP dispatch mode.

Fields

§routing_key: String

Routing-key filter (topic-exchange semantics): .-delimited words, * matches one word, # matches zero or more words.

§condition: Option<String>

Optional expression evaluated against the delivery body.

Implementations§

Trait Implementations§

Source§

impl Clone for SopTrigger

Source§

fn clone(&self) -> SopTrigger

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SopTrigger

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SopTrigger

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for SopTrigger

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'_enum> From<&'_enum SopTrigger> for SopTriggerSource

Source§

fn from(val: &'_enum SopTrigger) -> SopTriggerSource

Converts to this type from the input type.
Source§

impl From<SopTrigger> for SopTriggerSource

Source§

fn from(val: SopTrigger) -> SopTriggerSource

Converts to this type from the input type.
Source§

impl IntoDiscriminant for SopTrigger

Source§

type Discriminant = SopTriggerSource

Enum listing the same variants as this enum but without any data fields
Source§

fn discriminant(&self) -> Self::Discriminant

Source§

impl JsonSchema for SopTrigger

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl PartialEq for SopTrigger

Source§

fn eq(&self, other: &SopTrigger) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · §

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SopTrigger

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for SopTrigger

Source§

impl StructuralPartialEq for SopTrigger

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,