#[non_exhaustive]pub enum InvalidProjectionId {
Empty,
TooLong {
len: usize,
},
ControlCharacter,
BidirectionalControl,
Reserved {
prefix: &'static str,
},
}Expand description
A ProjectionId failed validation (VT-35).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
The id was empty. It is the primary key of a checkpoint row, and an empty key names nothing.
TooLong
The id exceeded MAX_PROJECTION_ID_LEN bytes.
ControlCharacter
The id contained a control character (Unicode Cc), NUL among them,
which a Postgres text column refuses at commit.
BidirectionalControl
The id contained one of the explicit bidirectional formatting controls: U+202A–U+202E or U+2066–U+2069.
Separate from ControlCharacter for the reason
InvalidTag::BidirectionalControl
gives.
Reserved
The id began with a reserved prefix, compared as exact bytes.
sync/ belongs to SY-31’s replication watermark and is minted only by
ProjectionId::sync_watermark. happenstance/ is held for ids this
library may mint later, so that minting one is not a breaking change.
Trait Implementations§
Source§impl Clone for InvalidProjectionId
impl Clone for InvalidProjectionId
Source§impl Debug for InvalidProjectionId
impl Debug for InvalidProjectionId
Source§impl Display for InvalidProjectionId
impl Display for InvalidProjectionId
impl Eq for InvalidProjectionId
Source§impl Error for InvalidProjectionId
impl Error for InvalidProjectionId
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<!> for InvalidProjectionId
impl From<!> for InvalidProjectionId
Source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Lets a caller accept impl TryInto<ProjectionId, Error: Into<InvalidProjectionId>>
and so take both a &str, which converts fallibly, and an already-built
ProjectionId, whose conversion cannot fail, with no second error
type.
The match has no arms because Infallible
has no values, which the compiler accepts as exhaustive.