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.6.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
impl Copy for UnknownPolicy
impl Eq for UnknownPolicy
impl StructuralPartialEq for UnknownPolicy
Auto Trait Implementations§
impl Freeze for UnknownPolicy
impl RefUnwindSafe for UnknownPolicy
impl Send for UnknownPolicy
impl Sync for UnknownPolicy
impl Unpin for UnknownPolicy
impl UnwindSafe for UnknownPolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)