在cargo build
期间,我收到以下错误.我不确定该如何解决这件事.
error: not &self method
--> src/new_service.rs:20:18
|
20 | pub async fn new() -> Self {
| ^^^
Src/new_service.rs的相关部分:
pub struct Service {
start: Event,
collections: Vec<Collection>,
clients: Vec<Client>,
}
#[dbus_interface(name ="org.freedesktop.Secret.Service")]
impl Service {
pub async fn new() -> Self {
Service {
start: event_listener::Event::new(),
collections: Vec::new(),
clients: Vec::new(),
}
}
.....