You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: backslashes.rs
    path of file: ./repos/ruff/crates/ruff_linter/src/rules/pydocstyle/rules
    
    the code of the file until where you have to start completion: use memchr::memchr_iter;

use ruff_diagnostics::{Diagnostic, Edit, Fix, FixAvailability, Violation};
use ruff_macros::{derive_message_formats, violation};
use ruff_text_size::Ranged;

use crate::checkers::ast::Checker;
use crate::docstrings::Docstring;

/// ## What it 
    
pub(crate) fn backslashes(checker: &mut Checker, docstring: &Docstring) {
    // Docstring is already raw.
    if docstring.leading_quote().contains(['r', 'R']) {
        return;
    }

    // Docstring contains at least one backslash.
    let body = docstring.body();
    let bytes = body.as_bytes();
    if memchr_iter(b'\\', bytes).any(|position| {
        let escaped_char = bytes.get(position.saturating_add(1));
        // Allow continuations (backslashes followed by newlines) and Unicode escapes.
        !matches!(escaped_char, Some(b'\r' | b'\n' | b'u' | b'U' | b'N'))
    }) {
        let mut diagnostic = Diagnostic::new(EscapeSequenceInDocstring, docstring.range());

        if !docstring.leading_quote().contains(['u', 'U']) {
            diagnostic.set_fix(Fix::unsafe_edit(Edit::range_replacement(
                "r".to_owned() + docstring.contents,
                docstring.range(),
            )));
        }

        checker.diagnostics.push(diagnostic);
    }
}