pub struct AnonymousTraversalSource { /* private fields */ }Implementations§
Source§impl AnonymousTraversalSource
impl AnonymousTraversalSource
pub fn new() -> AnonymousTraversalSource
pub fn in_v(&self) -> TraversalBuilder
pub fn aggregate<A>(&self, alias: A) -> TraversalBuilder
pub fn add_v<A>(&self, label: A) -> TraversalBuilder
pub fn property<A>(&self, key: Either2<&str, T>, value: A) -> TraversalBuilder
pub fn v<T>(&self, ids: T) -> TraversalBuilder
pub fn add_e<A>(&self, label: A) -> TraversalBuilder
pub fn count(&self) -> TraversalBuilder
Sourcepub fn out<L>(&self, labels: L) -> TraversalBuilder
pub fn out<L>(&self, labels: L) -> TraversalBuilder
Examples found in repository?
examples/traversal_complex.rs (line 51)
7fn main() -> Result<(), Box<dyn std::error::Error>> {
8 let client = GremlinClient::connect("localhost")?;
9
10 let g = traversal().with_remote(client);
11
12 create_graph(&g)?;
13
14 let result = g
15 .v(())
16 .has_label("complex_vertex")
17 .has(("name", "test1"))
18 .out("complex_label")
19 .out("complex_label")
20 .value_map(())
21 .next()?
22 .expect("no vertices found");
23
24 println!(
25 "Found vertex with name {:?}",
26 result["name"].get::<List>().unwrap()[0]
27 );
28
29 let results = g
30 .v(())
31 .has_label("complex_vertex")
32 .has(("number", P::gt(3)))
33 .to_list()?;
34
35 println!(
36 "Found {} vertices with number greater than 3",
37 results.len()
38 );
39
40 let results = g
41 .v(())
42 .has_label("complex_vertex")
43 .has(("number", P::within((3, 6))))
44 .to_list()?;
45
46 println!("Found {} vertices with number 3 or 6", results.len());
47
48 let results = g
49 .v(())
50 .has_label("complex_vertex")
51 .where_(__.out("complex_label").count().is(P::gte(1)))
52 .to_list()?;
53
54 println!(
55 "Found {} vertices with 1 or more connected edges with label complex_label",
56 results.len()
57 );
58
59 Ok(())
60}pub fn out_e<L>(&self, labels: L) -> TraversalBuilder
pub fn in_<L>(&self, labels: L) -> TraversalBuilder
pub fn in_e<L>(&self, labels: L) -> TraversalBuilder
pub fn both<L>(&self, labels: L) -> TraversalBuilder
pub fn both_e<L>(&self, labels: L) -> TraversalBuilder
pub fn other(&self) -> TraversalBuilder
pub fn other_v(&self) -> TraversalBuilder
pub fn values<L>(&self, labels: L) -> TraversalBuilder
pub fn has_label<L>(&self, labels: L) -> TraversalBuilder
pub fn as_<A>(&self, alias: A) -> TraversalBuilder
pub fn has<A>(&self, step: A) -> TraversalBuilder
pub fn has_many<A>(&self, steps: Vec<A>) -> TraversalBuilder
pub fn not<A>(&self, step: A) -> TraversalBuilder
pub fn loops<A>(&self, step: A) -> TraversalBuilder
pub fn select<A>(&self, step: A) -> TraversalBuilderwhere
A: Into<SelectStep>,
pub fn fold(&self) -> TraversalBuilder
pub fn unfold(&self) -> TraversalBuilder
pub fn out_v(&self) -> TraversalBuilder
pub fn is<A>(&self, val: A) -> TraversalBuilderwhere
A: IntoPredicate,
pub fn or<A>(&self, step: A) -> TraversalBuilder
pub fn where_<A>(&self, step: A) -> TraversalBuilder
pub fn cap(&self, step: &'static str) -> TraversalBuilder
pub fn project<A>(&self, step: A) -> TraversalBuilderwhere
A: Into<SelectStep>,
pub fn constant<A>(&self, value: A) -> TraversalBuilder
pub fn until<A>(&self, step: A) -> TraversalBuilder
pub fn repeat<A>(&self, step: A) -> TraversalBuilderwhere
A: Into<RepeatStep>,
pub fn emit(&self) -> TraversalBuilder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnonymousTraversalSource
impl RefUnwindSafe for AnonymousTraversalSource
impl Send for AnonymousTraversalSource
impl Sync for AnonymousTraversalSource
impl Unpin for AnonymousTraversalSource
impl UnwindSafe for AnonymousTraversalSource
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