Import Struct in Rust
By default, Struct is private when using in different module. This post will show example for importing struct from different module.
Define a public struct for all fields in the struct.
If we only define pub struct, and not for the field, the field will be automatically be private. So in the case if you want to access the field directly, you would need to define the field as pub also.
Calling the pub struct from different directory for the test file.
Hope it helps.