My `pub enum` seen as private in example

I am writing a little library where the lib.rs pulls in a module tree from tree.rs that has a pub enum Tree<T> {..} in it.

I have a little example in eaxmples/ that extern crate gp (gp being the name I am using) and use gp::tree::Tree. But I get the error error[E0603]: enum Tree is private

I am at a bit of a loss. This is the first example I have written so I have probably missed out some syntax, but I cannot find it.

So is it structured like so?

// src/lib.rs
pub mod tree;

// other code
// src/tree.rs
pub enum Tree<T> { ... }
// examples/xx.rs
extern crate gp;

use gp::tree::Tree;

Where your file structure is

.
ā”œ src
|  ā”œā”€ lib.rs
|  ā””ā”€ tree.rs
ā”” examples
   ā””ā”€ xx.rs
1 Like

Is the module public?

Bingo.
Thank you.
Missing pub from there.