TcpStream is the name of a struct. In the documentation i find:
pub struct TcpStream(_);
- I do not understand the parameter underscore.
- How can i find the fields of this struct?
TcpStream is the name of a struct. In the documentation i find:
pub struct TcpStream(_);
The fields are private, you can't access them from your code. The underscore indicates that they have been omitted. You must interact with the TcpStream
type through its methods and associated functions.
Can i see them in some library, where they are declaired private to that library?
To add a little more context to @jer's reply - when you're looking at the docs for an item, you can always click the 'src' link on the right to jump to a view of the actual definition: