pub struct FaceParseError {
pub message: String,
}Expand description
Why authored face text was refused. 创作注册面文本被拒绝的原因。
The parser used to answer with a bare String; an error type keeps the
message a caller renders while still telling a parse failure apart from any
other string that happens to travel through the same code.
解析器过去用裸 String 作答;有了错误类型,调用方既能渲染消息,又能把解析失败与
恰好流经同一段代码的其它字符串区分开。
Fields§
§message: StringHuman-readable reason, rendered verbatim by Display.
人类可读的原因,Display 原样渲染。
Implementations§
Source§impl FaceParseError
impl FaceParseError
Sourcepub fn new(message: impl Into<String>) -> FaceParseError
pub fn new(message: impl Into<String>) -> FaceParseError
A refusal with its human-readable reason. 带人类可读理由的拒绝。
Trait Implementations§
Source§impl Clone for FaceParseError
impl Clone for FaceParseError
Source§fn clone(&self) -> FaceParseError
fn clone(&self) -> FaceParseError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FaceParseError
impl Debug for FaceParseError
Source§impl Display for FaceParseError
impl Display for FaceParseError
impl Eq for FaceParseError
Source§impl Error for FaceParseError
impl Error for FaceParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<String> for FaceParseError
impl From<String> for FaceParseError
Source§fn from(message: String) -> FaceParseError
fn from(message: String) -> FaceParseError
Converts to this type from the input type.
Source§impl PartialEq for FaceParseError
impl PartialEq for FaceParseError
impl StructuralPartialEq for FaceParseError
Auto Trait Implementations§
impl Freeze for FaceParseError
impl RefUnwindSafe for FaceParseError
impl Send for FaceParseError
impl Sync for FaceParseError
impl Unpin for FaceParseError
impl UnsafeUnpin for FaceParseError
impl UnwindSafe for FaceParseError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more