#[non_exhaustive]pub enum ParseTableNameError {
EmptySegment {
name: String,
},
TooManySegments {
name: String,
},
}Expand description
Why a string does not name a table.
§Examples
use ruststream_sqlx_dialect::{ParseTableNameError, TableName};
// A dead-letter table read from configuration that also names a database is refused.
let refused = TableName::parse("db.archive.email_jobs_dead");
assert!(matches!(refused, Err(ParseTableNameError::TooManySegments { .. })));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EmptySegment
The name, or one of its segments, is empty.
TooManySegments
The name has more than one dot.
Trait Implementations§
Source§impl Clone for ParseTableNameError
impl Clone for ParseTableNameError
Source§impl Debug for ParseTableNameError
impl Debug for ParseTableNameError
Source§impl Display for ParseTableNameError
impl Display for ParseTableNameError
impl Eq for ParseTableNameError
Source§impl Error for ParseTableNameError
impl Error for ParseTableNameError
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 PartialEq for ParseTableNameError
impl PartialEq for ParseTableNameError
impl StructuralPartialEq for ParseTableNameError
Auto Trait Implementations§
impl Freeze for ParseTableNameError
impl RefUnwindSafe for ParseTableNameError
impl Send for ParseTableNameError
impl Sync for ParseTableNameError
impl Unpin for ParseTableNameError
impl UnsafeUnpin for ParseTableNameError
impl UnwindSafe for ParseTableNameError
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