Repository navigation
feat(error): report unusable network interfaces as InterfaceNotFound - #135
Open
stewartadam wants to merge 1 commit into
Open
stewartadam wants to merge 1 commit into
stewartadam wants to merge 1 commit into
Conversation
An interface given to set_multicast_interfaces, with_interfaces or from_socket that doesn't exist, or has no address of the socket's IP version, now returns SacnError::InterfaceNotFound instead of Io(NotFound). SacnError is non-exhaustive, and interface selection hasn't been released yet, so no released behaviour changes. Also drop the stale Windows IPv6 example from OsOperationUnsupported's docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVSfy9eXbfgqTKMEq7P
This branch has not been deployed
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.
Follow-up to #100 now that #129 has made
SacnError#[non_exhaustive].Change
SacnError::InterfaceNotFound(String).set_multicast_interfaces(source and receiver),SacnReceiver::with_interfacesandSacnReceiver::from_socketreturn it when an interface doesn't exist, or exists but has no address of the socket's IP version. The message names the interface and the reason.IowithErrorKind::NotFound.Iois now reserved for real OS failures: listing interfaces, setting socket options, joining groups.OsOperationUnsupported's docs no longer give Windows IPv6 multicast as an example, since feat(interface): let callers choose network interfaces for multicast #100 enabled it.Compatibility
Adding a variant to
SacnErroris non-breaking since #129. Interface selection (#100) hasn't been in a release yet (latest is v0.12.0), so no released behaviour changes. The title therefore has no!.Tests
src/interface.rsand the two non-ignoredinterface_selectiontests intests/ipv4_tests.rsnow check forInterfaceNotFound.cargo test, Clippy with-D warnings(Linux andx86_64-pc-windows-gnu), andcargo docwith-D warnings.Generated by Claude Code