My `pub enum` seen as private in example

I am writing a little library where the pulls in a module tree from 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/
pub mod tree;

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

use gp::tree::Tree;

Where your file structure is

ā”œ src
|  ā”œā”€
|  ā””ā”€
ā”” examples
1 Like

Is the module public?

Thank you.
Missing pub from there.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.