Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0599]: no method named into_bytes found for struct map::BoltMap in the current scope #83

Open
Karbinee opened this issue May 15, 2023 · 0 comments

Comments

@Karbinee
Copy link

Hi, I am currently trying to connect to run rust code in my neo4j, I have already created a EC2 instance ausing ubuntu 22.04 and using putty I ahve connected to Neo4j, successfully logged in, I downloaded rust programming language to the instance as well as build essential, I was able to successfully run hello world! I updated the dependencies to include neo4rs = "0.4.1" and tokio = { version = "1", features = ["full"] }

use neo4rs::{GraphDatabase, bolt::Client};

#[tokio::main]
async fn main() -> neo4rs::Result<()> {
let client = Client::new("bolt://localhost:7687", "neo4j", "password").await?;
let result = client.execute("MATCH (n) RETURN n", None).await?;

for record in result.records {
    println!("{:?}", record?);
}

Ok(())

}

Note: i updated the localhost for my ec2 ip address

As i was installing neo4rs v0.4.9. During the compiling i ran into an error message(error[E0599]).

when i do cargo run

rustup --version
info: The currently active rustc version is `rustc 1.69.0

cargo --version
cargo 1.69.0

rustc --version
rustc 1.69.0

Here is a copy of the error message.

error[E0599]: no method named into_bytes found for struct map::BoltMap in the current scope
--> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/neo4rs-0.4.9/src/messages/begin.rs:4:35
|
4 | #[derive(Debug, PartialEq, Clone, BoltStruct)]
| ^^^^^^^^^^ help: there is a method with a similar name: to_bytes
|
::: /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/neo4rs-0.4.9/src/types/map.rs:19:1
|
19 | pub struct BoltMap {
| ------------------ method into_bytes not found for this struct
image

here is a snippet of the message.

I also received this code. it appears that it could be related to the crate specifically in the handling of UnboundedRelation values.

The error seem to indicate that the library is trying to call a method to_bytes() on fields of UnboundedRelation that either don't exist or don't have this method.

112 | BoltType::UnboundedRelation(t) => t.id.to_bytes(version),
| +++
112 | BoltType::UnboundedRelation(t) => t.properties.to_bytes(version),
| +++++++++++
112 | BoltType::UnboundedRelation(t) => t.typ.to_bytes(version),
| ++++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant