....0",
"description": "Created with Anchor"
}
}
```
## Accounts and events as type
帐户和事件类型信息过去分别存储在它们自己的属性、帐户和事件中。这产生了一个问题,在某些情况下找不到类型,因为类型字段中不存在类型定义。
...
...@latest
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.7.1: Rimraf versio...
... &s; // 没问题
let r3 = &mut s; // 错误
println!("{}, {}, and {}", r1, r2, r3);
```
错误信息:
```
$ cargo run
Compiling variables v0.1.0 (/projects/variables)
error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immutable
--> src/main.rs:6:14
...
...kage_services_ids: vector,
income: Balance,
}
```
## 2.5 Service and PackageServices
- Service
单项服务,只需要服务名称和其价格:
```move
public struct Service has store, drop {
service_name: String,
price: u64,
}
```
- PackageServices
服务套...