Skip to content

Add wrapper types for SocketAddr{,V4,V6} with the x-rust-type extension#82

Merged
ahl merged 3 commits into
mainfrom
sockaddr
Jun 1, 2026
Merged

Add wrapper types for SocketAddr{,V4,V6} with the x-rust-type extension#82
ahl merged 3 commits into
mainfrom
sockaddr

Conversation

@ahl

@ahl ahl commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Also:

  • some typos
  • fixed issues with cargo test --no-default-features

Closes #81

@ahl ahl requested a review from jgallagher June 1, 2026 17:48
Comment thread src/sockaddr.rs
}
}

impl From<$inner> for $wrapper {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also want From<$wrapper> for $inner conversions?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nevermind the field is pub so that's just $wrapper($inner) isn't it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do? But we already impl Deref and DerefMut? If you're able to make use of this thing I'd love to know what traits we need for it to be simple to use

@ahl ahl merged commit ae7d544 into main Jun 1, 2026
14 checks passed
@ahl ahl deleted the sockaddr branch June 1, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an x-rust-type for SocketAddr{,V4,V6}

2 participants