Struct smartcrop::ScoredCrop
source · pub struct ScoredCrop {
pub crop: Crop,
pub score: Score,
}Expand description
Crop with attached score
Fields§
§crop: CropCrop position and size
score: ScoreScore used to determine the best crop
Implementations§
source§impl ScoredCrop
impl ScoredCrop
sourcepub fn scale(&self, ratio: f64) -> ScoredCrop
pub fn scale(&self, ratio: f64) -> ScoredCrop
Scale the crop to be applied to an image of a different size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScoredCrop
impl RefUnwindSafe for ScoredCrop
impl Send for ScoredCrop
impl Sync for ScoredCrop
impl Unpin for ScoredCrop
impl UnwindSafe for ScoredCrop
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> 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