pub enum CodegenError {
DuplicateType(Id),
Unsupported(String),
DuplicateAction(String),
UnresolvedReference(String),
ExpectedEntity {
common_type: String,
ty: String,
},
CedarSchemaError(Box<CedarSchemaError>),
SchemaError(Box<SchemaError>),
}Expand description
Code generation errors
Variants§
DuplicateType(Id)
Multiple types map to the same Id in the schema.
Unsupported(String)
Something is unsupported.
DuplicateAction(String)
Multiple actions have the same name.
UnresolvedReference(String)
A reference was not found.
ExpectedEntity
Expected an entity but found a common type instead.
CedarSchemaError(Box<CedarSchemaError>)
Failed to parse cedar schema
SchemaError(Box<SchemaError>)
Failed to parse json schema
Trait Implementations§
Source§impl Debug for CodegenError
impl Debug for CodegenError
Source§impl Display for CodegenError
impl Display for CodegenError
Source§impl Error for CodegenError
impl Error for CodegenError
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<Box<CedarSchemaError>> for CodegenError
impl From<Box<CedarSchemaError>> for CodegenError
Source§fn from(source: Box<CedarSchemaError>) -> Self
fn from(source: Box<CedarSchemaError>) -> Self
Converts to this type from the input type.
Source§impl From<Box<SchemaError>> for CodegenError
impl From<Box<SchemaError>> for CodegenError
Source§fn from(source: Box<SchemaError>) -> Self
fn from(source: Box<SchemaError>) -> Self
Converts to this type from the input type.
Source§impl From<CedarSchemaError> for CodegenError
impl From<CedarSchemaError> for CodegenError
Source§fn from(value: CedarSchemaError) -> Self
fn from(value: CedarSchemaError) -> Self
Converts to this type from the input type.
Source§impl From<SchemaError> for CodegenError
impl From<SchemaError> for CodegenError
Source§fn from(value: SchemaError) -> Self
fn from(value: SchemaError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CodegenError
impl !RefUnwindSafe for CodegenError
impl Send for CodegenError
impl Sync for CodegenError
impl Unpin for CodegenError
impl !UnwindSafe for CodegenError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more