Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

armanriazi•rust•error•E0277•the trait bound `` is not satisfied

It seems you do not bound trait for a specific struct or type so you need to define your trait for a struct

use gui::Screen;

fn main() {
    let screen = Screen {
        components: vec![Box::new(String::from("Hi"))],
    };

    screen.run();
}
//Attempting to use a type(String) that doesn’t implement the trait object’s trait
 
PREVIOUS NEXT
Tagged: #trait #bound #satisfied
ADD COMMENT
Topic
Name
3+8 =