rust - 模式 `&Unspecified` 和 `&__Nonexhaustive` 未涵盖
问题描述
我在一个match
街区得到这个:
patterns `&Unspecified` and `&__Nonexhaustive` not covered
编码:
fn vipaddress_from_ipddress(address: &IpAddress) -> VIpAddress {
match address {
我认为&Unspecified
与不考虑 null 情况有关,但 Rust 中的引用不能为 null。是什么 &__Nonexhaustive
?
解决方案
似乎是一个未记录的枚举变体:https ://docs.rs/ethox/0.0.1-wip/src/ethox/wire/ip.rs.html#15
这可能表明开发者不期望IpAddress
用户match
; 也许已经有一个功能在做你想做的事?
推荐阅读
- python - 无法使用自定义服务方法保存 tf.keras.Model
- python - 如何在预测阶段获得所有输出 keras 层(特征图)?
- ios - 从 android studio 在 iOS 上运行 Flutter 应用程序
- python - 为什么我们不能在 Python 中下标“int”对象
- ruby-on-rails - 当方法不存在时,如何使用 rspec 导致测试失败?
- gnuradio - 什么是
gnuradio 3.7 XML 中的属性意味着什么,它在 3.8 YML 中的等价物是什么? - javascript - 创建喜欢不喜欢的功能喜欢instagram
- c++ - 我可以使用没有 dso 问题的库进行编译吗?
- node.js - 自动重新发送图像
- r - 为什么这两个矩阵不能正确连接