pub struct AttributionCredit { /* private fields */ }Expand description
Attribution credit represented as a 0.0..=1.0 share.
Implementations§
Source§impl AttributionCredit
impl AttributionCredit
Sourcepub fn new(value: f32) -> Result<Self, AttributionValueError>
pub fn new(value: f32) -> Result<Self, AttributionValueError>
Creates an attribution credit value.
§Errors
Returns AttributionValueError::InvalidCredit when the value is outside 0.0..=1.0.
Trait Implementations§
Source§impl Clone for AttributionCredit
impl Clone for AttributionCredit
Source§fn clone(&self) -> AttributionCredit
fn clone(&self) -> AttributionCredit
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 AttributionCredit
impl Debug for AttributionCredit
Source§impl PartialEq for AttributionCredit
impl PartialEq for AttributionCredit
Source§fn eq(&self, other: &AttributionCredit) -> bool
fn eq(&self, other: &AttributionCredit) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AttributionCredit
impl StructuralPartialEq for AttributionCredit
Auto Trait Implementations§
impl Freeze for AttributionCredit
impl RefUnwindSafe for AttributionCredit
impl Send for AttributionCredit
impl Sync for AttributionCredit
impl Unpin for AttributionCredit
impl UnsafeUnpin for AttributionCredit
impl UnwindSafe for AttributionCredit
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