diff --git a/src/flags.rs b/src/flags.rs index 38200a0fbdb711808b754989c0511b0bf5c515d6..420b1f00f4c410c872d694e2daf994170cd9b2d5 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -96,10 +96,19 @@ impl Default for Flags { } #[derive(Copy, Clone, Debug)] +#[doc(hidden)] +/// Special marker used to vary `Flags` at compile time pub struct DisallowCache; #[derive(Copy, Clone, Debug)] +#[doc(hidden)] +/// Special marker used to vary `Flags` at compile time pub struct AllowCache; +/// Used by `Flags` to keep track whether `Flags::NO_CACHE` has been used, +/// which enables thread-safe sharing of `Transform`s. +/// +/// Valid values are `AllowCache` and `DisallowCache`, +/// but you won't need to use them directly. Just use `Flags`' constants. pub trait CacheFlag: Sized {} impl CacheFlag for AllowCache {} impl CacheFlag for DisallowCache {}