pub enum StarError {
InvalidQuotedTriple {
message: String,
context: Option<String>,
suggestion: Option<String>,
},
ParseError(Box<ParseErrorDetails>),
SerializationError {
message: String,
format: Option<String>,
context: Option<String>,
},
QueryError {
message: String,
query_fragment: Option<String>,
position: Option<usize>,
suggestion: Option<String>,
},
CoreError(OxirsError),
ReificationError {
message: String,
reification_strategy: Option<String>,
context: Option<String>,
},
InvalidTermType {
message: String,
term_type: Option<String>,
expected_types: Option<Vec<String>>,
suggestion: Option<String>,
},
NestingDepthExceeded {
max_depth: usize,
current_depth: usize,
context: Option<String>,
},
UnsupportedFormat {
format: String,
available_formats: Vec<String>,
},
ConfigurationError {
message: String,
parameter: Option<String>,
valid_range: Option<String>,
},
InternalError {
message: String,
context: Option<String>,
},
}Expand description
RDF-star specific error types
Variants§
InvalidQuotedTriple
ParseError(Box<ParseErrorDetails>)
SerializationError
QueryError
Fields
CoreError(OxirsError)
ReificationError
InvalidTermType
Fields
NestingDepthExceeded
UnsupportedFormat
ConfigurationError
InternalError
Implementations§
Source§impl StarError
impl StarError
Sourcepub fn invalid_quoted_triple(message: impl Into<String>) -> Self
pub fn invalid_quoted_triple(message: impl Into<String>) -> Self
Create a simple invalid quoted triple error (backward compatibility)
Sourcepub fn parse_error(message: impl Into<String>) -> Self
pub fn parse_error(message: impl Into<String>) -> Self
Create a simple parse error (backward compatibility)
Sourcepub fn serialization_error(message: impl Into<String>) -> Self
pub fn serialization_error(message: impl Into<String>) -> Self
Create a simple serialization error (backward compatibility)
Sourcepub fn query_error(message: impl Into<String>) -> Self
pub fn query_error(message: impl Into<String>) -> Self
Create a simple query error (backward compatibility)
Sourcepub fn reification_error(message: impl Into<String>) -> Self
pub fn reification_error(message: impl Into<String>) -> Self
Create a simple reification error (backward compatibility)
Sourcepub fn invalid_term_type(message: impl Into<String>) -> Self
pub fn invalid_term_type(message: impl Into<String>) -> Self
Create a simple invalid term type error (backward compatibility)
Sourcepub fn nesting_depth_exceeded(
max_depth: usize,
current_depth: usize,
context: Option<String>,
) -> Self
pub fn nesting_depth_exceeded( max_depth: usize, current_depth: usize, context: Option<String>, ) -> Self
Create a nesting depth error
Sourcepub fn configuration_error(message: impl Into<String>) -> Self
pub fn configuration_error(message: impl Into<String>) -> Self
Create a configuration error
Sourcepub fn internal_error(message: impl Into<String>) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Create an internal error (for unexpected conditions such as lock poisoning)
Sourcepub fn lock_error(context: impl Into<String>) -> Self
pub fn lock_error(context: impl Into<String>) -> Self
Create an internal error for lock poisoning
Sourcepub fn unsupported_format(
format: impl Into<String>,
available: Vec<String>,
) -> Self
pub fn unsupported_format( format: impl Into<String>, available: Vec<String>, ) -> Self
Create an unsupported format error with available alternatives
Sourcepub fn recovery_suggestions(&self) -> Vec<String>
pub fn recovery_suggestions(&self) -> Vec<String>
Get available recovery suggestions for the error
Sourcepub fn resource_error(message: impl Into<String>) -> Self
pub fn resource_error(message: impl Into<String>) -> Self
Create a resource error (backward compatibility)
Sourcepub fn processing_error(message: impl Into<String>) -> Self
pub fn processing_error(message: impl Into<String>) -> Self
Create a processing error (backward compatibility)
Trait Implementations§
Source§impl Error for StarError
impl Error for StarError
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<Box<ParseErrorDetails>> for StarError
impl From<Box<ParseErrorDetails>> for StarError
Source§fn from(source: Box<ParseErrorDetails>) -> Self
fn from(source: Box<ParseErrorDetails>) -> Self
Source§impl From<OxirsError> for StarError
impl From<OxirsError> for StarError
Source§fn from(source: OxirsError) -> Self
fn from(source: OxirsError) -> Self
Auto Trait Implementations§
impl Freeze for StarError
impl RefUnwindSafe for StarError
impl Send for StarError
impl Sync for StarError
impl Unpin for StarError
impl UnsafeUnpin for StarError
impl UnwindSafe for StarError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.