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

E0599 - 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 E0599

This error occurs when a method is used on a type which doesn’t implement it:

Erroneous code example:

#![allow(unused)]
fn main() {
struct Mouth;

let x = Mouth;
x.chocolate(); // error: no method named `chocolate` found for type `Mouth`
               //        in the current scope
}

In this case, you need to implement the chocolate method to fix the error:

#![allow(unused)]
fn main() {
struct Mouth;

impl Mouth {
    fn chocolate(&self) { // We implement the `chocolate` method here.
        println!("Hmmm! I love chocolate!");
    }
}

let x = Mouth;
x.chocolate(); // 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/./E0599.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy