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: intern.rs
    path of file: ./repos/artichoke/artichoke-backend/src
    
    the code of the file until where you have to start completion: use std::borrow::Cow;

use intaglio::SymbolOverflowError;
use spinoso_exception::Fatal;

use crate::core::{ClassRegistry, Intern, TryConvertMut};
use crate::error::{Error, RubyException};
use crate::ffi::InterpreterExtractError;
use crate::sys;
use crate::Artichoke;

impl Artichoke {
    pub fn lookup_symbol_with_trailing_nul(&self, symbol: u32) -> Result<Option<&[u8]>, Error> {
        let state = self.state.a
    
    pub fn check_interned_bytes_with_trailing_nul(&self, bytes: &[u8]) -> Result<Option<u32>, Error> {
        let state = self.state.as_deref().ok_or_else(InterpreterExtractError::new)?;
        let symbol = state.symbols.check_interned(bytes);
        if let Some(symbol) = symbol {
            let symbol = u32::from(symbol);
            // mruby expects symbols to be non-zero.
            let symbol = symbol
                .checked_add(<Self as Intern>::SYMBOL_RANGE_START)
                .ok_or_else(SymbolOverflowError::new)?;
            Ok(Some(symbol))
        } else {
            Ok(None)
        }
    }