pub enum Edge {
Direct {
source: String,
target: EdgeTarget,
},
Conditional {
source: String,
router: Arc<dyn Fn(&HashMap<String, Value>) -> String + Sync + Send>,
targets: HashMap<String, EdgeTarget>,
},
Entry {
targets: Vec<String>,
},
}Available on crate feature
graph only.Expand description
Edge type
Variants§
Direct
Direct edge: always go from source to target
Conditional
Conditional edge: route based on state
Fields
§
router: Arc<dyn Fn(&HashMap<String, Value>) -> String + Sync + Send>Router function returns target node name or END
§
targets: HashMap<String, EdgeTarget>Map of route names to targets (for validation and documentation)
Entry
Entry edge: from START to first node(s)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Edge
impl !RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl !UnwindSafe for Edge
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request