pub enum BehaviorError {
EmptyPath {
slot: &'static str,
},
AbsolutePath {
slot: &'static str,
path: PathBuf,
},
ParentEscape {
slot: &'static str,
path: PathBuf,
},
NonLispExtension {
slot: &'static str,
path: PathBuf,
},
}Variants§
Implementations§
Source§impl BehaviorError
impl BehaviorError
Sourcepub fn absolute_path(slot: &'static str, path: &Path) -> Self
pub fn absolute_path(slot: &'static str, path: &Path) -> Self
Construct a BehaviorError::AbsolutePath naming the offending :behavior :on-* slot label and callback path. Folds the uniform Self::AbsolutePath { slot, path: path.to_path_buf() } two-field struct-literal onto one substrate primitive so every closure passed to crate::render::require_sandboxed_lisp_path at [validate_callback_path] on this variant reads through one dispatch rather than the pre-lift four-line open-coded block. The slot label threads verbatim from BehaviorSpec::declared_slots and the path from the same iterator at the call site.
Sourcepub fn parent_escape(slot: &'static str, path: &Path) -> Self
pub fn parent_escape(slot: &'static str, path: &Path) -> Self
Construct a BehaviorError::ParentEscape naming the offending :behavior :on-* slot label and callback path. Folds the uniform Self::ParentEscape { slot, path: path.to_path_buf() } two-field struct-literal onto one substrate primitive so every closure passed to crate::render::require_sandboxed_lisp_path at [validate_callback_path] on this variant reads through one dispatch rather than the pre-lift four-line open-coded block. The slot label threads verbatim from BehaviorSpec::declared_slots and the path from the same iterator at the call site.
Sourcepub fn non_lisp_extension(slot: &'static str, path: &Path) -> Self
pub fn non_lisp_extension(slot: &'static str, path: &Path) -> Self
Construct a BehaviorError::NonLispExtension naming the offending :behavior :on-* slot label and callback path. Folds the uniform Self::NonLispExtension { slot, path: path.to_path_buf() } two-field struct-literal onto one substrate primitive so every closure passed to crate::render::require_sandboxed_lisp_path at [validate_callback_path] on this variant reads through one dispatch rather than the pre-lift four-line open-coded block. The slot label threads verbatim from BehaviorSpec::declared_slots and the path from the same iterator at the call site.
Trait Implementations§
Source§impl Debug for BehaviorError
impl Debug for BehaviorError
Source§impl Display for BehaviorError
impl Display for BehaviorError
impl Eq for BehaviorError
Source§impl Error for BehaviorError
impl Error for BehaviorError
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 PartialEq for BehaviorError
impl PartialEq for BehaviorError
impl StructuralPartialEq for BehaviorError
Auto Trait Implementations§
impl Freeze for BehaviorError
impl RefUnwindSafe for BehaviorError
impl Send for BehaviorError
impl Sync for BehaviorError
impl Unpin for BehaviorError
impl UnsafeUnpin for BehaviorError
impl UnwindSafe for BehaviorError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.