我有一个名为USE_TUTURUS的项目,项目 struct 列在这里.
使用教程(_T)
- SRC
- Lib.rs
- 双手
Lib.rs内容为:
pub trait Draw {
fn draw(&self);
}
主要内容是:
use crate::Draw;
// use 使用教程(_T)::Draw;
// use super::Draw;
struct SelectBox {
width: u32,
height: u32,
options: Vec<String>
},
impl Draw for SelectBox {
fn draw(&self) {
println!("SelectBox draw");
}
}
fn main() {
//....
}
When the use statements is use 使用教程(_T)::Draw
, it works well.
But When the use statements is use crate::Draw
or use super::Draw
, it doesn't work well.
Why?