From 0ba7e33685f57f0558ba190fdf9d8004ec4a993a Mon Sep 17 00:00:00 2001 From: Grzegorz Nosek Date: Tue, 22 Oct 2024 10:04:14 +0200 Subject: [PATCH] fix(docs): export TableWriter and Validated* vtable variants Even though these exports aren't absolutely necessary (you can use the types/traits without being able to name them), it makes docs a bit better. (also, we had a broken link to TableWriter) Signed-off-by: Grzegorz Nosek --- falco_plugin/src/lib.rs | 4 ++++ falco_plugin/src/plugin/tables/vtable/reader.rs | 3 ++- falco_plugin/src/plugin/tables/vtable/writer.rs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/falco_plugin/src/lib.rs b/falco_plugin/src/lib.rs index 00644702..2fe8194f 100644 --- a/falco_plugin/src/lib.rs +++ b/falco_plugin/src/lib.rs @@ -290,6 +290,7 @@ pub mod async_event { /// The event type that can be emitted from async event plugins pub use falco_event::events::types::PPME_ASYNCEVENT_E as AsyncEvent; + pub use crate::plugin::async_event::async_handler::AsyncHandler; pub use crate::plugin::async_event::AsyncEventPlugin; @@ -638,7 +639,10 @@ pub mod listen { pub mod tables { pub use crate::plugin::tables::vtable::reader::LazyTableReader; pub use crate::plugin::tables::vtable::reader::TableReader; + pub use crate::plugin::tables::vtable::reader::ValidatedTableReader; pub use crate::plugin::tables::vtable::writer::LazyTableWriter; + pub use crate::plugin::tables::vtable::writer::TableWriter; + pub use crate::plugin::tables::vtable::writer::ValidatedTableWriter; pub use crate::plugin::tables::vtable::TablesInput; /// Exporting tables to other plugins diff --git a/falco_plugin/src/plugin/tables/vtable/reader.rs b/falco_plugin/src/plugin/tables/vtable/reader.rs index a362e53d..38cf5983 100644 --- a/falco_plugin/src/plugin/tables/vtable/reader.rs +++ b/falco_plugin/src/plugin/tables/vtable/reader.rs @@ -10,7 +10,8 @@ use std::marker::PhantomData; /// A vtable containing table read access methods /// -/// It's used as a token to prove you're allowed to read tables in a particular context +/// It's used as a token to prove you're allowed to read tables in a particular context. +/// The default implementation is [`crate::tables::LazyTableReader`]. pub trait TableReader: private::TableReaderImpl {} impl TableReader for T {} diff --git a/falco_plugin/src/plugin/tables/vtable/writer.rs b/falco_plugin/src/plugin/tables/vtable/writer.rs index 93d28fa9..ad1440ab 100644 --- a/falco_plugin/src/plugin/tables/vtable/writer.rs +++ b/falco_plugin/src/plugin/tables/vtable/writer.rs @@ -10,6 +10,7 @@ use std::marker::PhantomData; /// A vtable containing table write access methods /// /// It's used as a token to prove you're allowed to write tables in a particular context +/// The default implementation is [`crate::tables::LazyTableWriter`]. pub trait TableWriter: private::TableWriterImpl {} impl TableWriter for T {}