Q:

What does "expected item, found let" mean?

My code below returns the error
expected item, found `let`

What does that mean?
pub struct MyStorage{
    name: Vec<u8>
}

impl Storage for MyStorage {
   //let mut name: Vec<u8> = [0x11];
   fn get(&mut self) -> Vec<u8> {
       self.name
       }
   }

let my_storage = MyStorage{name = [0x11]};

A:

There's a number of issues with this code, but the error you are getting is because you are trying to execute code but not from within a function:
let my_storage = MyStorage{name = [0x11]};

You need to put that in something. Here, I've added it to main:
pub struct MyStorage{
    name: Vec<u8>
}

impl MyStorage {
   fn get(self) -> Vec<u8> {
        self.name
    }
}

fn main() {
    let my_storage = MyStorage { name: vec![0x11] };
}

I also had to fix the vector construction (vec!), removed the trait reference that doesn't exist (MyStorage), and changed the type of self in get. With all that, the code compiles.

