Content-Length: 24264 | pFad | https://doc.rust-lang.org/std/string/../error/../string/../vec/../../error_codes/./E0046.html

E0046 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0046

Items are missing in a trait implementation.

Erroneous code example:

#![allow(unused)]
fn main() {
trait Foo {
    fn foo();
}

struct Bar;

impl Foo for Bar {}
// error: not all trait items implemented, missing: `foo`
}

When trying to make some type implement a trait Foo, you must, at minimum, provide implementations for all of Foo’s required methods (meaning the methods that do not have default implementations), as well as any required trait items like associated types or constants. Example:

#![allow(unused)]
fn main() {
trait Foo {
    fn foo();
}

struct Bar;

impl Foo for Bar {
    fn foo() {} // ok!
}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/string/../error/../string/../vec/../../error_codes/./E0046.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy