pub struct EdgePattern {
pub alias: Option<String>,
pub from: String,
pub to: String,
pub edge_label: Option<String>,
pub direction: EdgeDirection,
pub min_hops: u32,
pub max_hops: u32,
}Expand description
Edge pattern: -[alias:Type*min..max]->
Fields§
§alias: Option<String>Optional alias for this edge
from: StringSource node alias
to: StringTarget node alias
edge_label: Option<String>Optional label filter (user-supplied string).
direction: EdgeDirectionEdge direction
min_hops: u32Minimum hops (for variable-length patterns)
max_hops: u32Maximum hops (for variable-length patterns)
Implementations§
Source§impl EdgePattern
impl EdgePattern
Sourcepub fn new(from: &str, to: &str) -> EdgePattern
pub fn new(from: &str, to: &str) -> EdgePattern
Create a new edge pattern
Sourcepub fn of_label(self, label: impl Into<String>) -> EdgePattern
pub fn of_label(self, label: impl Into<String>) -> EdgePattern
Set label filter (string form — preferred).
Sourcepub fn direction(self, dir: EdgeDirection) -> EdgePattern
pub fn direction(self, dir: EdgeDirection) -> EdgePattern
Set direction
Sourcepub fn hops(self, min: u32, max: u32) -> EdgePattern
pub fn hops(self, min: u32, max: u32) -> EdgePattern
Set hop range for variable-length patterns
Sourcepub fn alias(self, alias: &str) -> EdgePattern
pub fn alias(self, alias: &str) -> EdgePattern
Set alias
Trait Implementations§
Source§impl Clone for EdgePattern
impl Clone for EdgePattern
Source§fn clone(&self) -> EdgePattern
fn clone(&self) -> EdgePattern
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 moreAuto Trait Implementations§
impl Freeze for EdgePattern
impl RefUnwindSafe for EdgePattern
impl Send for EdgePattern
impl Sync for EdgePattern
impl Unpin for EdgePattern
impl UnsafeUnpin for EdgePattern
impl UnwindSafe for EdgePattern
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<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 moreSource§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