Repository navigation
Split socket capabilities into individual operation traits. - #41
Merged
samuel-williams-shopify merged 2 commits intoOct 18, 2026
Merged
Conversation
samuel-williams-shopify
deleted the
refactor/socket-operation-capabilities
branch
October 18, 2026 04:25
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split socket capabilities into individual operation traits, following the file capability model introduced in #40. Protocol code can now require
SocketRead + SocketWritefor an existing connection without requiring socket creation, listening, options, or message I/O.SocketOperationowns the sharedSocketassociated type. Each core operation has its own trait, andSocketScheduleris a blanket convenience aggregate. Message sending and receiving are independent capabilities, as are typed option getters and setters;SocketMessagesandSocketOptions<O>automatically aggregate their respective pairs. Optional capabilities and resource registration depend only onSocketOperation.Spell out address names throughout the public interface:
SocketAddressre-exportsstd::net::SocketAddr, whileSocketLocalAddress::socket_local_addressandSocketPeerAddress::socket_peer_addressreplace the abbreviated inspection names. Both the executor and facade export the address type; standard-library addresses remain directly interchangeable.Migrate native readiness, io_uring, Tokio, and simulated implementations while preserving operation signatures and runtime behavior. Update examples and conformance helpers to declare the operations they use, add a minimal in-memory read/write implementation and compile-time capability examples, and document migration for implementors and callers. This is a source-breaking API refactor: concrete callers import individual operation traits, and qualified resource paths use
<S as SocketOperation>::Socket.