Skip to content

Commit

Permalink
Hide some unintended internal methods on traits
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Sep 3, 2022
1 parent a9dc433 commit c195120
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions minijinja/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub(crate) struct BoxedFilter(RcType<FilterFunc>);
/// A utility trait that represents filters.
pub trait Filter<V, Rv, Args>: Send + Sync + 'static {
/// Applies a filter to value with the given arguments.
#[doc(hidden)]
fn apply_to(&self, state: &State, value: V, args: Args) -> Result<Rv, Error>;
}

Expand Down
1 change: 1 addition & 0 deletions minijinja/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub(crate) struct BoxedFunction(Arc<FuncFunc>, &'static str);
/// A utility trait that represents global functions.
pub trait Function<Rv, Args>: Send + Sync + 'static {
/// Calls a function with the given arguments.
#[doc(hidden)]
fn invoke(&self, env: &State, args: Args) -> Result<Rv, Error>;
}

Expand Down
1 change: 1 addition & 0 deletions minijinja/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub(crate) struct BoxedTest(RcType<TestFunc>);
/// A utility trait that represents filters.
pub trait Test<V, Args>: Send + Sync + 'static {
/// Performs a test to value with the given arguments.
#[doc(hidden)]
fn perform(&self, state: &State, value: V, args: Args) -> Result<bool, Error>;
}

Expand Down
1 change: 1 addition & 0 deletions minijinja/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ pub trait FunctionArgs: Sized {
/// `None` if it was not. This is used to implement optional arguments
/// to functions.
pub trait ArgType: Sized {
#[doc(hidden)]
fn from_value(value: Option<Value>) -> Result<Self, Error>;
}

Expand Down

0 comments on commit c195120

Please sign in to comment.