pub struct MetadataScore {
pub gps: u32,
pub timezone: u32,
pub camera_info: u32,
pub capture_time: u32,
pub lens_info: u32,
pub location: u32,
pub total: u32,
}Expand description
Metadata completeness score for an asset.
Each category contributes a weighted score based on presence of metadata. Higher total scores indicate more complete metadata.
Fields§
§gps: u32GPS coordinate score (0 or 30)
timezone: u32Timezone score (0 or 20)
camera_info: u32Camera make/model score (0 or 15)
capture_time: u32Original capture time score (0 or 15)
lens_info: u32Lens info score (0 or 10)
location: u32Location (city/country) score (0 or 10)
total: u32Total weighted score (sum of all categories)
Implementations§
Source§impl MetadataScore
impl MetadataScore
Sourcepub fn from_asset(asset: &AssetResponse) -> Self
pub fn from_asset(asset: &AssetResponse) -> Self
Score an asset based on its metadata completeness.
Uses the has_*() helper methods on ExifInfo to determine
which metadata categories are present.
Trait Implementations§
Source§impl Clone for MetadataScore
impl Clone for MetadataScore
Source§fn clone(&self) -> MetadataScore
fn clone(&self) -> MetadataScore
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 MetadataScore
impl Debug for MetadataScore
Source§impl Default for MetadataScore
impl Default for MetadataScore
Source§fn default() -> MetadataScore
fn default() -> MetadataScore
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetadataScore
impl<'de> Deserialize<'de> for MetadataScore
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
impl Eq for MetadataScore
Source§impl Ord for MetadataScore
impl Ord for MetadataScore
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MetadataScore
impl PartialEq for MetadataScore
Source§fn eq(&self, other: &MetadataScore) -> bool
fn eq(&self, other: &MetadataScore) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MetadataScore
impl PartialOrd for MetadataScore
Source§impl Serialize for MetadataScore
impl Serialize for MetadataScore
impl StructuralPartialEq for MetadataScore
Auto Trait Implementations§
impl Freeze for MetadataScore
impl RefUnwindSafe for MetadataScore
impl Send for MetadataScore
impl Sync for MetadataScore
impl Unpin for MetadataScore
impl UnsafeUnpin for MetadataScore
impl UnwindSafe for MetadataScore
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().