So I'm making a little tictactoe to learn Rust. I define a Board which is a struct containing a 3 by 3 array called "tiles".
pub struct Board {
pub tiles: [[Option<Players>; 3]; 3],
}
Then, I try to create a method that uses the element "tiles" as a parameter
impl Board {
pub fn print_board (board: Board::tiles) {
}
However, Rust gets all offended and tells me this.
ambiguous associated typerustcE0223 game.rs(10, 32): use fully-qualified syntax: "<Board as Trait>::tiles"
First of all, I have no idea what this mean, but then I try to do as it says:
impl Board {
pub fn print_board (board: <Board as Trait>::tiles) {
}
it gives me squiggles under "Trait" where it says
failed to resolve: use of undeclared type "Trait" use of undeclared type "Trait"
Rust, o Rust what ever am I supposed to do?