pub struct BatchPolicy {
pub lossless: bool,
pub lossy: bool,
pub cross_format: bool,
pub min_score: Option<f64>,
pub formats: Vec<String>,
pub accept_warnings: Vec<String>,
pub resources: Option<Vec<usize>>,
}Expand description
What a batch may do. The defaults apply only verified lossless, same-format candidates.
Fields§
§lossless: bool§lossy: bool§cross_format: boolAllow conversions that change the file format (and migrate references).
min_score: Option<f64>Extra floor for lossy candidates, on top of the analysis threshold.
formats: Vec<String>Target formats to allow; empty allows every format.
accept_warnings: Vec<String>Warning kinds accepted for the whole batch. Empty skips warning candidates.
resources: Option<Vec<usize>>Restrict the batch to these resource indexes (e.g. the filtered view).
Implementations§
Trait Implementations§
Source§impl Clone for BatchPolicy
impl Clone for BatchPolicy
Source§fn clone(&self) -> BatchPolicy
fn clone(&self) -> BatchPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchPolicy
impl Debug for BatchPolicy
Source§impl Default for BatchPolicy
impl Default for BatchPolicy
Source§impl<'de> Deserialize<'de> for BatchPolicywhere
BatchPolicy: Default,
impl<'de> Deserialize<'de> for BatchPolicywhere
BatchPolicy: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BatchPolicy
impl RefUnwindSafe for BatchPolicy
impl Send for BatchPolicy
impl Sync for BatchPolicy
impl Unpin for BatchPolicy
impl UnsafeUnpin for BatchPolicy
impl UnwindSafe for BatchPolicy
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more