-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Socket::bind_device missing on linux platforms #441
Comments
I don't see a difference in the Are you sure another dependency didn't enable the In any case the |
@Thomasdezeeuw Yes, it's more subtle than the function-specific attributes, which is why I think it was the removal by 5d61324 of an injected I agree Also is it intentional that methods only available on specific platforms are not documented in the generic crate docs? If so, how are people supposed to find the functions even exist? |
Are you refering to the correct commit? I don't see any changes to
No, that shouldn't be the case. Lines 29 to 32 in 3047737
|
@Thomasdezeeuw Yes; I now think I was misreading the comment:
as suggesting that the removal of I didn't see any other commits that seemed relevant, but before submitting the issue I did verify that an otherwise unchanged application that specified
It doesn't seem to, since the current API documentation claims to come from 0.5.3 (the commit you referenced), but it still lacks the FYI, there is no |
Odd. It is available if you switch to the Linux documentation: https://docs.rs/socket2/latest/x86_64-unknown-linux-gnu/socket2/struct.Socket.html#method.bind_device. I just noticed that other, e.g., Linux specific methods such as
Thanks, I've fixed that. |
Ah, I've found the issue. We need to use |
So I looked into this a little more, but it seems quite difficult to actually document all items due to missing types/dependent crates, especially when we want to document Windows items on Unix or visa versa. For example if we want to document that Windows specific extension we need to include the Windows version of the I'm not quite sure what the best way forward is here... For now we could at least recommend people look at the target specific docs so they aren't missing methods. |
Yes, it's a pain. In Tokio, we have a doc-only module called |
Do you think it's worth it (for Socket2)? |
Somewhere between v0.4.9 and v0.5 the method Socket::bind_device disappeared on linux platforms unless feature
all
is explicitly selected.Without diving too deeply I suspect this is due to #249 removing an implicit requirement on
all
elsewhere.The method is also no longer listed on the generic documentation, though
bind_device_by_index
remains.I'm working around this by adding the
all
feature, but if this change wasn't intentional it'd be nice to get it fixed.The text was updated successfully, but these errors were encountered: