struct ImportantExcerpt<'a> {
    part: &'a str,
}

// ANCHOR: 1st
impl<'a> ImportantExcerpt<'a> {
    fn level(&self) -> i32 {
        3
    }
}
// ANCHOR_END: 1st

// ANCHOR: 3rd
impl<'a> ImportantExcerpt<'a> {
    fn announce_and_return_part(&self, announcement: &str) -> &str {
        println!("Prosimy o uwagę: {}", announcement);
        self.part
    }
}
// ANCHOR_END: 3rd

fn main() {
    let novel = String::from("Mówcie mi Izmael. Przed kilkoma laty...");
    let first_sentence = novel.split('.').next().expect("Nie znaleziono '.'");
    let i = ImportantExcerpt {
        part: first_sentence,
    };
}
