pub enum SerializeError {
InvalidStructure {
reason: String,
},
InvalidValue {
value_type: String,
reason: String,
},
InvalidIdentifier {
identifier: String,
reason: String,
},
ValidationFailed {
gram: String,
reason: String,
},
IoError {
message: String,
},
}Expand description
Error during pattern serialization to gram notation
Variants§
InvalidStructure
Pattern structure cannot be represented in gram notation
InvalidValue
Invalid value that cannot be serialized
InvalidIdentifier
Invalid identifier (contains disallowed characters)
ValidationFailed
Serialized output failed validation
IoError
I/O error during serialization (e.g., writing to file)
Implementations§
Source§impl SerializeError
impl SerializeError
Sourcepub fn invalid_structure(reason: impl Into<String>) -> Self
pub fn invalid_structure(reason: impl Into<String>) -> Self
Create error for invalid pattern structure
Sourcepub fn invalid_value(
value_type: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_value( value_type: impl Into<String>, reason: impl Into<String>, ) -> Self
Create error for invalid value
Trait Implementations§
Source§impl Clone for SerializeError
impl Clone for SerializeError
Source§fn clone(&self) -> SerializeError
fn clone(&self) -> SerializeError
Returns a duplicate of the value. Read more
1.0.0 · 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 SerializeError
impl Debug for SerializeError
Source§impl Display for SerializeError
impl Display for SerializeError
Source§impl Error for SerializeError
impl Error for SerializeError
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<Error> for SerializeError
impl From<Error> for SerializeError
Source§impl PartialEq for SerializeError
impl PartialEq for SerializeError
impl StructuralPartialEq for SerializeError
Auto Trait Implementations§
impl Freeze for SerializeError
impl RefUnwindSafe for SerializeError
impl Send for SerializeError
impl Sync for SerializeError
impl Unpin for SerializeError
impl UnsafeUnpin for SerializeError
impl UnwindSafe for SerializeError
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