[Error] Method not found in SampleMut #143
Closed
antaradey-itk
started this conversation in
General
Replies: 1 comment 1 reply
-
@antaradey-itk You can have a look at https://docs.rs/iceoryx2/0.2.2/iceoryx2/ for the v0.2 API. Spoiler alert ... you have to use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I am new to Rust, and currently working on a project of Rust Posix interoperability. I am trying to explore ways to use IPC mechanisms and shared memory. I want to create a simple Publisher/Subscriber example or use an existing example by using the iceoryx2 crate.
I have imported the publish_subscribe example in my own workspace, and included iceoryx2 crate in .toml file.
It looks like this:
[package]
name = "iceoryx2"
description = "Iceoryx2 examples"
edition = "2021"
version = "0.1.0"
[dependencies]
iceoryx2 = { version = "0.2.2" }
Yet, when I try the run the publisher, it throws an error .send() not found in SampleMut. I would like to know what is it that I might be doing wrong or missing here, or is it an existing issue?
Command:
cargo run --bin publisher
Output:
Compiling proc-macro2 v1.0.78
Compiling unicode-ident v1.0.12
Compiling libc v0.2.153
Compiling glob v0.3.1
Compiling rustix v0.38.31
Compiling prettyplease v0.2.16
Compiling regex-syntax v0.8.2
Compiling bitflags v2.4.2
Compiling linux-raw-sys v0.4.13
Compiling cfg-if v1.0.0
Compiling memchr v2.7.1
Compiling minimal-lexical v0.2.1
Compiling libloading v0.8.3
Compiling syn v1.0.109
Compiling serde v1.0.197
Compiling clang-sys v1.7.0
Compiling version_check v0.9.4
Compiling nom v7.1.3
Compiling home v0.5.9
Compiling quote v1.0.35
Compiling bindgen v0.65.1
Compiling either v1.10.0
Compiling syn v2.0.52
Compiling atty v0.2.14
Compiling termsize v0.1.6
Compiling shlex v1.3.0
Compiling log v0.4.21
Compiling rustc-hash v1.1.0
Compiling peeking_take_while v0.1.2
Compiling lazycell v1.3.0
Compiling lazy_static v1.4.0
Compiling bitflags v1.3.2
Compiling iceoryx2-bb-log v0.2.2
Compiling iceoryx2-pal-configuration v0.2.2
Compiling cc v1.0.89
Compiling iceoryx2-bb-elementary v0.2.2
Compiling proc-macro-error-attr v1.0.4
Compiling iceoryx2-bb-container v0.2.2
Compiling proc-macro-error v1.0.4
Compiling regex-automata v0.4.6
Compiling iceoryx2-pal-concurrency-sync v0.2.2
Compiling tiny-fn v0.1.6
Compiling heck v0.4.1
Compiling iceoryx2-bb-lock-free v0.2.2
Compiling which v4.4.2
Compiling aliasable v0.1.3
Compiling byteorder v1.5.0
Compiling cexpr v0.6.0
Compiling static_assertions v1.1.0
Compiling iceoryx2-bb-testing v0.2.2
Compiling sha1_smol v1.0.0
Compiling once_cell v1.19.0
Compiling regex v1.10.3
Compiling pin-init-internal v0.2.0
Compiling serde_derive v1.0.197
Compiling enum-iterator-derive v1.3.0
Compiling ouroboros_macro v0.17.2
Compiling pin-init v0.2.0
Compiling enum-iterator v1.5.0
Compiling ouroboros v0.17.2
Compiling iceoryx2-pal-posix v0.2.2
Compiling iceoryx2-bb-system-types v0.2.2
Compiling toml v0.5.11
Compiling cdr v0.2.4
Compiling iceoryx2-bb-posix v0.2.2
Compiling iceoryx2-bb-memory v0.2.2
Compiling iceoryx2-bb-threadsafe v0.2.2
Compiling iceoryx2-cal v0.2.2
Compiling iceoryx2 v0.2.2
Compiling iceoryx2 v0.1.0 (/home/antara/Project/Git/Rust/posix/sharedmemory/rust/iceoryx2)
error[E0599]: no method named
send
found for structSampleMut
in the current scope--> src/bin/publisher.rs:47:16
|
47 | sample.send()?;
| ^^^^ method not found in
SampleMut<'_, '_, '_, Service<'_>, Header, TransmissionData>
For more information about this error, try
rustc --explain E0599
.error: could not compile
iceoryx2
(bin "publisher") due to previous errorHelp would be appreciated. Thanks 👍
Beta Was this translation helpful? Give feedback.
All reactions