Skip to main content

DirectiveFailure

Struct DirectiveFailure 

Source
#[non_exhaustive]
pub struct DirectiveFailure { /* private fields */ }
Expand description

A directive whose schema document could not be read (see SchemaSet::directive_failures).

Display: xs:include schemaLocation="missing.xsd" at main.xsd:2:3: the schema document could not be read: Failed to read file '…': ….

Implementations§

Source§

impl DirectiveFailure

Source

pub fn kind(&self) -> CompositionEdgeKind

The directive: include, import, redefine or override.

Source

pub fn schema_location(&self) -> Option<&str>

The schemaLocation as written, or, for an import without one that a catalog entry mapped, None.

Source

pub fn namespace(&self) -> Option<&str>

The namespace of an xs:import.

Source

pub fn resolved_location(&self) -> Option<&str>

The location that was read and failed: the location rewriter’s answer for the schemaLocation, if one is set (final, see LocationRewriter), else the schemaLocation resolved against the including document’s base URI; for an xs:import whose namespace the catalog maps, the catalog’s location (tried after the hint, so the one whose failure is reported).

Source

pub fn namespace_supplied(&self) -> bool

Whether another document of the set supplies the namespace of this xs:import — a location hint failed, but the namespace’s components are not missing for that (they may still be incomplete). Always false for the other directives.

Source

pub fn location(&self) -> Option<&SourceLocation>

Where the directive is, in the document that contains it.

Source

pub fn error(&self) -> &SchemaError

Why the document could not be read (a resolution or I/O error).

Trait Implementations§

Source§

impl Debug for DirectiveFailure

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DirectiveFailure

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for DirectiveFailure

§

impl !UnwindSafe for DirectiveFailure

§

impl Forget for DirectiveFailure

§

impl Freeze for DirectiveFailure
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, &'static str: Freeze, *const () is !null: Freeze, PhantomData<ErrorData<CustomOwner>>: Freeze,

§

impl Move for DirectiveFailure

§

impl Send for DirectiveFailure
where RawVecInner: Send, &'static str: Send, Repr: Send,

§

impl Sync for DirectiveFailure
where RawVecInner: Sync, Repr: Sync,

§

impl Unpin for DirectiveFailure
where *const u8 is !null: Unpin, &'static str: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin,

§

impl UnsafeUnpin for DirectiveFailure
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, &'static str: UnsafeUnpin, *const () is !null: UnsafeUnpin, PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.