# Function rustc_lexer::unescape::unescape_unicode

source ·

    pub fn unescape_unicode<F>(src: &str, mode: Mode, callback: &mut F)where
        F: FnMut(Range<usize>, Result<char, EscapeError>),

Expand description

Takes the contents of a unicode-only (non-mixed-utf8) literal (without quotes) and produces a sequence of escaped characters or errors.

Values are returned by invoking `callback`. For `Char` and `Byte` modes, the callback will be called exactly once.