Enum typify_impl::UnknownPolicy
source · pub enum UnknownPolicy {
Generate,
Allow,
Deny,
}
Expand description
Policy to apply to external types described by schema extensions whose crates are not explicitly specified.
Variants§
Generate
Generate the type rather according to the schema.
Allow
Use the specified type by path (this will result in a compile error if one of the crates is not an existing dependency). Note that this ignores compatibility requirements specified by the schema extension and may result in subtle failures if the crate used is incompatible with the version that produced the schema.
Deny
If an unknown crate is encountered, generate a compiler warning indicating the crate that must be specified to proceed along with version constraints. This affords users an opportunity to specify the specific crate version to use (or the user may explicitly deny use of that crate).
Trait Implementations§
source§impl Clone for UnknownPolicy
impl Clone for UnknownPolicy
source§fn clone(&self) -> UnknownPolicy
fn clone(&self) -> UnknownPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UnknownPolicy
impl Debug for UnknownPolicy
source§impl Default for UnknownPolicy
impl Default for UnknownPolicy
source§fn default() -> UnknownPolicy
fn default() -> UnknownPolicy
source§impl<'de> Deserialize<'de> for UnknownPolicy
impl<'de> Deserialize<'de> for UnknownPolicy
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for UnknownPolicy
impl PartialEq for UnknownPolicy
source§fn eq(&self, other: &UnknownPolicy) -> bool
fn eq(&self, other: &UnknownPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.