namespace AIStudio.Tools.Rust; /// /// Why the Rust runtime could not prepare an image for an AI model. /// /// /// UNKNOWN comes first on purpose. The converter for the enums of the runtime falls back to the /// default value for a code it does not know, e.g., from a newer runtime, and such a code must /// never read as a prepared image. /// public enum ModelImageErrorCode { /// /// The runtime answered with a code this version does not know, or it could not be asked at all. /// UNKNOWN, /// /// No failure happened: the image was prepared. /// NONE, // // Codes reported by the Rust runtime: // FILE_NOT_FOUND, /// /// The file exists, but could not be opened, e.g., for lack of permission. /// FILE_NOT_READABLE, /// /// AI Studio cannot decode this image format, e.g., HEIC, AVIF, or SVG. /// UNSUPPORTED_FORMAT, /// /// The content of the file does not match its file extension. /// CONTENT_MISMATCH, /// /// The file is damaged or uses a variant of its format which cannot be decoded. /// NOT_DECODABLE, /// /// Decoding the image would need more memory than the runtime allows. /// TOO_MANY_PIXELS, /// /// Not even the smallest size and lowest quality the runtime accepts fit into the byte budget. /// BUDGET_NOT_REACHABLE, /// /// Any failure in the runtime which does not carry a code of its own. /// INTERNAL, }