Skip to content

Commit

Permalink
fix(docs): export TableWriter and Validated* vtable variants
Browse files Browse the repository at this point in the history
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 <grzegorz.nosek@sysdig.com>
  • Loading branch information
gnosek authored and poiana committed Oct 22, 2024
1 parent 030b9eb commit 0ba7e33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions falco_plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion falco_plugin/src/plugin/tables/vtable/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: private::TableReaderImpl> TableReader for T {}
Expand Down
1 change: 1 addition & 0 deletions falco_plugin/src/plugin/tables/vtable/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: private::TableWriterImpl> TableWriter for T {}
Expand Down

0 comments on commit 0ba7e33

Please sign in to comment.