pub struct TransformError(/* private fields */);Expand description
A dynamic error that ended a transformation.
Its contents are boxed: a Result of the executor is then a pointer wide, which keeps
small the frames of the functions every level of recursion through the templates goes
through.
Implementations§
Source§impl TransformError
impl TransformError
Sourcepub fn new(code: &str, message: impl Into<String>) -> Self
pub fn new(code: &str, message: impl Into<String>) -> Self
A new error with an XPath, XSLT or serialization error code.
Sourcepub fn limit_exceeded(limit: LimitExceeded) -> Self
pub fn limit_exceeded(limit: LimitExceeded) -> Self
The error for a limit exceeded, with the code LIMIT.
Sourcepub fn code(&self) -> &str
pub fn code(&self) -> &str
The error code (XPTY0004, XTDE0640, …). UNSUPPORTED marks a valid
construct or value that this crate refuses rather than evaluating it differently
from the reference engine, LIMIT a document or a transformation beyond a limit
of TransformOptions (see TransformError::limit),
INTERNAL a bug.
Sourcepub fn limit(&self) -> Option<LimitExceeded>
pub fn limit(&self) -> Option<LimitExceeded>
The limit exceeded, for an error with the code LIMIT: an element of the
document, or of a document loaded by document(), nested deeper than
TransformOptions::max_depth, or
templates and functions invoked one inside another more than
TransformOptions::max_nesting deep.
Trait Implementations§
Source§impl Clone for TransformError
impl Clone for TransformError
Source§impl Debug for TransformError
impl Debug for TransformError
Source§impl Display for TransformError
impl Display for TransformError
impl Eq for TransformError
Source§impl Error for TransformError
impl Error for TransformError
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()