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: image.rs
    path of file: ./repos/trow/src/trow_server
    
    the code of the file until where you have to start completion: use std::fmt;

use anyhow::{anyhow, Result};
use const_format::formatcp;
use lazy_static::lazy_static;

use super::server::is_digest;

/// The regex validates an imag
    
    fn test_parse_invalid() {
        let invalid_images = [
            "http://docker.io/amouat/myimage:test",
            "https://docker.io/amouat/myimage:test",
            "example.com:floppotron",
            "example.com/harlots:floppotron@saucisse",
        ];

        for i in invalid_images.iter() {
            let ret = RemoteImage::try_from_str("http://docker.io/amouat/myimage:test");
            if let Ok(img) = ret {
                panic!("Invalid image ref `{}` parsed as `{}`", i, img);
            }
        }
    }