pub struct EdgeCtx<'a, S> { /* private fields */ }Expand description
Per-edge context passed to a Kernel.
Holds the current edge (src)-[edge]->(dest) and the relevant per-path
state. Typed getters read node/edge Arrow payload columns by internal row
id.
Implementations§
Source§impl<'a, S> EdgeCtx<'a, S>
impl<'a, S> EdgeCtx<'a, S>
Sourcepub fn with_state<'b>(&'b self, state: &'b S) -> EdgeCtx<'b, S>
pub fn with_state<'b>(&'b self, state: &'b S) -> EdgeCtx<'b, S>
Returns a context borrowing state in place of the current one.
Mirrors the DSL’s with_state; used to evaluate stop against the
child state produced by next_state.
Sourcepub fn src_value(&self, col: &str) -> Result<Value>
pub fn src_value(&self, col: &str) -> Result<Value>
Reads node payload column col for the source node.
Sourcepub fn dest_value(&self, col: &str) -> Result<Value>
pub fn dest_value(&self, col: &str) -> Result<Value>
Reads node payload column col for the destination node.
Sourcepub fn edge_value(&self, col: &str) -> Result<Value>
pub fn edge_value(&self, col: &str) -> Result<Value>
Reads edge payload column col for the current edge.
Sourcepub fn src_u64(&self, col: &str) -> Result<Option<u64>>
pub fn src_u64(&self, col: &str) -> Result<Option<u64>>
Source node payload col as u64.
Coerces from integer/float when lossless; Ok(None) if null. Errors on
negative or non-integral values.
Sourcepub fn dest_u64(&self, col: &str) -> Result<Option<u64>>
pub fn dest_u64(&self, col: &str) -> Result<Option<u64>>
Destination node payload col as u64.
Coerces from integer/float when lossless; Ok(None) if null. Errors on
negative or non-integral values.
Sourcepub fn edge_u64(&self, col: &str) -> Result<Option<u64>>
pub fn edge_u64(&self, col: &str) -> Result<Option<u64>>
Edge payload col as u64.
Coerces from integer/float when lossless; Ok(None) if null. Errors on
negative or non-integral values.
Sourcepub fn src_i64(&self, col: &str) -> Result<Option<i64>>
pub fn src_i64(&self, col: &str) -> Result<Option<i64>>
Source node payload col as i64.
Coerces from integer/float when lossless; Ok(None) if null. Errors on
out-of-range or non-integral values.
Sourcepub fn dest_i64(&self, col: &str) -> Result<Option<i64>>
pub fn dest_i64(&self, col: &str) -> Result<Option<i64>>
Destination node payload col as i64.
Coerces from integer/float when lossless; Ok(None) if null. Errors on
out-of-range or non-integral values.
Sourcepub fn edge_i64(&self, col: &str) -> Result<Option<i64>>
pub fn edge_i64(&self, col: &str) -> Result<Option<i64>>
Edge payload col as i64.
Coerces from integer/float when lossless; Ok(None) if null. Errors on
out-of-range or non-integral values.
Sourcepub fn src_f64(&self, col: &str) -> Result<Option<f64>>
pub fn src_f64(&self, col: &str) -> Result<Option<f64>>
Source node payload col as f64.
Coerces from any numeric type; Ok(None) if null.
Sourcepub fn dest_f64(&self, col: &str) -> Result<Option<f64>>
pub fn dest_f64(&self, col: &str) -> Result<Option<f64>>
Destination node payload col as f64.
Coerces from any numeric type; Ok(None) if null.
Sourcepub fn edge_f64(&self, col: &str) -> Result<Option<f64>>
pub fn edge_f64(&self, col: &str) -> Result<Option<f64>>
Edge payload col as f64.
Coerces from any numeric type; Ok(None) if null.
Sourcepub fn src_bool(&self, col: &str) -> Result<Option<bool>>
pub fn src_bool(&self, col: &str) -> Result<Option<bool>>
Source node payload col as bool. Ok(None) if null.
Sourcepub fn dest_bool(&self, col: &str) -> Result<Option<bool>>
pub fn dest_bool(&self, col: &str) -> Result<Option<bool>>
Destination node payload col as bool. Ok(None) if null.
Sourcepub fn edge_bool(&self, col: &str) -> Result<Option<bool>>
pub fn edge_bool(&self, col: &str) -> Result<Option<bool>>
Edge payload col as bool. Ok(None) if null.
Sourcepub fn src_str(&self, col: &str) -> Result<Option<String>>
pub fn src_str(&self, col: &str) -> Result<Option<String>>
Source node payload col as String. Ok(None) if null.
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for EdgeCtx<'a, S>
impl<'a, S> !Send for EdgeCtx<'a, S>
impl<'a, S> !Sync for EdgeCtx<'a, S>
impl<'a, S> !UnwindSafe for EdgeCtx<'a, S>
impl<'a, S> Freeze for EdgeCtx<'a, S>
impl<'a, S> Unpin for EdgeCtx<'a, S>
impl<'a, S> UnsafeUnpin for EdgeCtx<'a, S>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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