pub struct DetectorKind {
pub name: &'static str,
pub doc: &'static str,
pub check: fn(&Map<String, Value>) -> Result<()>,
pub schema: Option<fn() -> Value>,
}Expand description
検出器の種類
Fields§
§name: &'static strブロックの "type"(組み込みのブロックの名前 crate::BUILTIN_BLOCKS とは別に)
doc: &'static str説明(スキーマの description)
check: fn(&Map<String, Value>) -> Result<()>項目("type"・"id" を除く)を確かめる。誤りなら説明
schema: Option<fn() -> Value>項目("type"・"id" を除く)の JSON スキーマ(無ければ何でも書ける)
Trait Implementations§
Source§impl Clone for DetectorKind
impl Clone for DetectorKind
impl Copy for DetectorKind
Auto Trait Implementations§
impl Freeze for DetectorKind
impl RefUnwindSafe for DetectorKind
impl Send for DetectorKind
impl Sync for DetectorKind
impl Unpin for DetectorKind
impl UnsafeUnpin for DetectorKind
impl UnwindSafe for DetectorKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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