in file key.rs of rustls crate,it defines the pub struct Certificate(pub Vec)
then in lib.rs of rustls crate, it defines its interfaces

then we use the Certificate struct in mesalink like this
Why can it omit the the name "key" after rustls?
in file key.rs of rustls crate,it defines the pub struct Certificate(pub Vec)
then we use the Certificate struct in mesalink like this
Why can it omit the the name "key" after rustls?
That's what pub use
does - it reexports a type in a different location (in this case the root of the crate).
Yes, every one of those can be omitted when you import it into your project.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.