pub enum CallbackRef {
Inline {
source: String,
},
File {
path: String,
},
Name(String),
}Expand description
A rule’s reference to its callback or parser, as written in the config.
Classification of the callback: string:
- ends with
.lua— a file path, relative to the config file; - contains whitespace or newlines — inline Lua source;
- otherwise — the name of a registered callback.
Variants§
Inline
callback: | block scalar.
File
callback: checks/foo.lua.
Name(String)
callback: my_name — resolved from the registry at build time.
Implementations§
Trait Implementations§
Source§impl Clone for CallbackRef
impl Clone for CallbackRef
Source§impl Debug for CallbackRef
impl Debug for CallbackRef
impl Eq for CallbackRef
Source§impl PartialEq for CallbackRef
impl PartialEq for CallbackRef
impl StructuralPartialEq for CallbackRef
Auto Trait Implementations§
impl Freeze for CallbackRef
impl RefUnwindSafe for CallbackRef
impl Send for CallbackRef
impl Sync for CallbackRef
impl Unpin for CallbackRef
impl UnsafeUnpin for CallbackRef
impl UnwindSafe for CallbackRef
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.