कोड टाइपिंग · Rust
Custom Error Enum
Domain errors with the Display trait.
कठिनाई: उन्नत · 15 पंक्तियां · लाइसेंस: public-domain
use std::fmt;
enum AppError {
NotFound,
Invalid(String),
}impl fmt::Display for AppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
समय0:00
गति (WPM)0.0
सटीकता100.0%
त्रुटियां0
लाइव कीबोर्ड
अगली कुंजी: U | अंतिम कुंजी: -
प्रगति: 0.0%
़
1
2
3
4
5
6
7
8
9
0
-
ृ
ौ
ै
ा
ी
ू
ब
ह
ग
द
ज
ड
ो
े
्
ि
ु
प
र
क
त
च
ट
ॉ
ं
म
न
व
ल
स
,
.
य
U
स्पेस
लीडरबोर्ड
अभी कोई परिणाम नहीं।