pub struct ResolutionConfig {
pub base_size: u32,
pub image_size: u32,
pub crop_mode: bool,
pub min_crops: usize,
pub max_crops: usize,
}Fields§
§base_size: u32§image_size: u32§crop_mode: bool§min_crops: usize§max_crops: usizeImplementations§
Source§impl ResolutionConfig
impl ResolutionConfig
pub fn new(mode: ResolutionMode) -> Self
pub fn tiny() -> Self
pub fn small() -> Self
pub fn base() -> Self
pub fn large() -> Self
pub fn gundam() -> Self
pub fn num_patches(&self, patch_size: usize) -> usize
pub fn patch_grid_size(&self, patch_size: usize) -> (usize, usize)
Trait Implementations§
Source§impl Clone for ResolutionConfig
impl Clone for ResolutionConfig
Source§fn clone(&self) -> ResolutionConfig
fn clone(&self) -> ResolutionConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ResolutionConfig
impl Debug for ResolutionConfig
Source§impl Default for ResolutionConfig
impl Default for ResolutionConfig
Source§impl<'de> Deserialize<'de> for ResolutionConfig
impl<'de> Deserialize<'de> for ResolutionConfig
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 ResolutionConfig
impl RefUnwindSafe for ResolutionConfig
impl Send for ResolutionConfig
impl Sync for ResolutionConfig
impl Unpin for ResolutionConfig
impl UnwindSafe for ResolutionConfig
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,
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