mirror of
https://github.com/ratspeak/rsReticulum
synced 2026-11-27 13:52:16 +00:00
api: make discovery rejection reasons non-exhaustive
This commit is contained in:
1 parent
2992377739
commit
efbc495e84
4 files changed
+8
-4
No files matched your search
@@ -94,7 +94,8 @@ Interface discovery carries Python 1.5's implementation keys.
|
||||
`..Default::default()`. `discovery::autoconnect::qualifies` applies Python's
|
||||
auto-connect rule, with `ReticulumConfig::autoconnect_unverified_implementations`
|
||||
as its opt-in. The receiver no longer stores types that are never listed, so
|
||||
`discovery::Reason` gains `UnlistedType`; exhaustive matches need the arm.
|
||||
`discovery::Reason` gains `UnlistedType` and becomes `#[non_exhaustive]`, so a
|
||||
match needs a wildcard arm.
|
||||
|
||||
`rns_link::clock::ContinuousInstant` reads a monotonic clock that keeps
|
||||
counting while the system is suspended: `CLOCK_BOOTTIME` on Linux and Android,
|
||||
|
||||
@@ -488,7 +488,7 @@ pub mod rns_transport::discovery::receiver
|
||||
pub enum rns_transport::discovery::receiver::Outcome
|
||||
pub rns_transport::discovery::receiver::Outcome::Accepted
|
||||
pub rns_transport::discovery::receiver::Outcome::Rejected(rns_transport::discovery::receiver::Reason)
|
||||
pub enum rns_transport::discovery::receiver::Reason
|
||||
#[non_exhaustive] pub enum rns_transport::discovery::receiver::Reason
|
||||
pub rns_transport::discovery::receiver::Reason::DecodeFailed
|
||||
pub rns_transport::discovery::receiver::Reason::DecryptFailed
|
||||
pub rns_transport::discovery::receiver::Reason::EncryptedWithoutKey
|
||||
@@ -588,7 +588,7 @@ pub rns_transport::discovery::ManifestError::NotAMap
|
||||
pub enum rns_transport::discovery::Outcome
|
||||
pub rns_transport::discovery::Outcome::Accepted
|
||||
pub rns_transport::discovery::Outcome::Rejected(rns_transport::discovery::receiver::Reason)
|
||||
pub enum rns_transport::discovery::Reason
|
||||
#[non_exhaustive] pub enum rns_transport::discovery::Reason
|
||||
pub rns_transport::discovery::Reason::DecodeFailed
|
||||
pub rns_transport::discovery::Reason::DecryptFailed
|
||||
pub rns_transport::discovery::Reason::EncryptedWithoutKey
|
||||
|
||||
+3
-1
@@ -52,7 +52,7 @@
|
||||
"compatibility": "reviewed-snapshot",
|
||||
"snapshot": "api/snapshots/rns-transport.txt",
|
||||
"itemCount": 1947,
|
||||
"sha256": "c4ff5c04b28d12b3ad660f5e0608810bf80235e6c4dd41a674413ded29c11240"
|
||||
"sha256": "43b699055b574dd1c04ef5b0add1c49cdeef65570023cfed9de3f0baf6bc5396"
|
||||
},
|
||||
{
|
||||
"name": "rns-link",
|
||||
@@ -114,6 +114,8 @@
|
||||
"migrationGuide": "api/migrations/1.4.md",
|
||||
"removed": {
|
||||
"rns-transport": [
|
||||
"pub enum rns_transport::discovery::Reason",
|
||||
"pub enum rns_transport::discovery::receiver::Reason",
|
||||
"pub fn rns_transport::tunnel::handle_tunnel(&mut rns_transport::tunnel::TunnelTable, [u8; 32], rns_transport::messages::InterfaceId, f64)",
|
||||
"pub rns_transport::actor::DiscoveryPathRequest::requesting_interface: rns_transport::messages::InterfaceId",
|
||||
"pub rns_transport::actor::DiscoveryPathRequest::timeout: f64",
|
||||
|
||||
@@ -77,6 +77,7 @@ pub enum Outcome {
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum Reason {
|
||||
/// No `app_data` on the announce — discovery announces always carry one.
|
||||
MissingAppData,
|
||||
|
||||
Reference in new issue
Block a user