-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Combine the capnp invocations
- Loading branch information
Showing
10 changed files
with
64 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//! Low-level protocol structures and serialisation, autogenerated from `control.capnp` | ||
// (c) 2024 Ross Younger | ||
#![allow( | ||
missing_debug_implementations, | ||
single_use_lifetimes, | ||
unreachable_pub, | ||
missing_docs, | ||
clippy::expl_impl_clone_on_copy, | ||
clippy::match_same_arms, | ||
clippy::missing_panics_doc, | ||
clippy::module_name_repetitions, | ||
clippy::must_use_candidate, | ||
clippy::semicolon_if_nothing_returned, | ||
clippy::uninlined_format_args, | ||
clippy::used_underscore_binding | ||
)] | ||
|
||
include!(concat!(env!("OUT_DIR"), "/control_capnp.rs")); | ||
|
||
use client_message::ConnectionType; | ||
use std::net::IpAddr; | ||
|
||
impl From<IpAddr> for ConnectionType { | ||
fn from(value: IpAddr) -> Self { | ||
match value { | ||
IpAddr::V4(_) => ConnectionType::Ipv4, | ||
IpAddr::V6(_) => ConnectionType::Ipv6, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//! Low-level protocol structures and serialisation, autogenerated from `session.capnp` | ||
// (c) 2024 Ross Younger | ||
|
||
#![allow( | ||
missing_debug_implementations, | ||
single_use_lifetimes, | ||
unreachable_pub, | ||
missing_docs, | ||
clippy::expl_impl_clone_on_copy, | ||
clippy::match_same_arms, | ||
clippy::missing_panics_doc, | ||
clippy::module_name_repetitions, | ||
clippy::must_use_candidate, | ||
clippy::semicolon_if_nothing_returned, | ||
clippy::uninlined_format_args, | ||
clippy::used_underscore_binding | ||
)] | ||
|
||
include!(concat!(env!("OUT_DIR"), "/session_capnp.rs")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters