pub enum OptionError {
UndeclaredRead {
stage: StageName,
option: String,
declared: Vec<String>,
},
UnknownOption {
site: BindSite,
option: String,
roster: Vec<String>,
workflow: Option<WorkflowName>,
},
BindingRefused {
site: BindSite,
option: String,
declared: Bind,
owner: FeatureName,
workflow: Option<WorkflowName>,
},
RegistryBoundRead {
stage: StageName,
option: String,
owner: FeatureName,
},
}Expand description
An error about option types and option values.
Each variant holds what a report needs, including the option types that
were available, so that a message can list them without looking anything
up again. A plan build returns these inside
PlanError, a run inside
RunError::DocumentOption,
and a stage’s read of an option directly.
Variants§
UndeclaredRead
A stage read an option type that it did not declare. The read returns this error rather than the type’s default, so that a missing declaration is reported instead of changing what the stage computes.
Fields
option: StringThe option type it read, by short name (OptionKey::short_name).
UnknownOption
A value was set for an option type that no feature of the registry declares.
Fields
workflow: Option<WorkflowName>The workflow whose render request sets the value, or None for a
value set on the document or on a render request built by hand.
BindingRefused
A value was set in a place that the option type’s binding does not admit, for example on the document for an option type bound to the render request.
Fields
owner: FeatureNameThe feature that declares the option type.
workflow: Option<WorkflowName>The workflow whose render request sets the value, or None for a
value set on the document or on a render request built by hand.
RegistryBoundRead
A stage declared a read of an option type whose binding is
Bind::Registry. Such a read could only return the type’s default,
since no value can be set for it; the feature that declares the option
type holds the value in its configuration.
Trait Implementations§
Source§impl Clone for OptionError
impl Clone for OptionError
Source§impl Debug for OptionError
impl Debug for OptionError
Source§impl Display for OptionError
impl Display for OptionError
impl Eq for OptionError
Source§impl Error for OptionError
impl Error for OptionError
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<OptionError> for LowerError
impl From<OptionError> for LowerError
Source§fn from(error: OptionError) -> LowerError
fn from(error: OptionError) -> LowerError
Source§impl PartialEq for OptionError
impl PartialEq for OptionError
impl StructuralPartialEq for OptionError
Auto Trait Implementations§
impl Forget for OptionError
impl Freeze for OptionErrorwhere
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
impl Move for OptionError
impl RefUnwindSafe for OptionError
impl Send for OptionError
impl Sync for OptionError
impl Unpin for OptionError
impl UnsafeUnpin for OptionErrorwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for OptionError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more