Struct Submission

Source
pub struct Submission<AuthId: Eq + Hash, ProductId: Eq + Hash> { /* private fields */ }
Expand description

A submission is a full expression of an agent’s preferences in an auction.

Implementations§

Source§

impl<AuthId: Eq + Hash + Clone, ProductId: Eq + Hash + Clone> Submission<AuthId, ProductId>

Source

pub fn new<A: IntoIterator<Item = (AuthId, Auth<ProductId>)>, B: IntoIterator<Item = (Group<AuthId>, Cost)>>( auths: A, costs: B, ) -> Option<Self>

Creates a new submission from the provided auths and costs. All data is assumed to be valid.

Trait Implementations§

Source§

impl<AuthId: Debug + Eq + Hash, ProductId: Debug + Eq + Hash> Debug for Submission<AuthId, ProductId>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<AuthId, ProductId> Freeze for Submission<AuthId, ProductId>

§

impl<AuthId, ProductId> RefUnwindSafe for Submission<AuthId, ProductId>
where AuthId: RefUnwindSafe, ProductId: RefUnwindSafe,

§

impl<AuthId, ProductId> Send for Submission<AuthId, ProductId>
where AuthId: Send, ProductId: Send,

§

impl<AuthId, ProductId> Sync for Submission<AuthId, ProductId>
where AuthId: Sync, ProductId: Sync,

§

impl<AuthId, ProductId> Unpin for Submission<AuthId, ProductId>
where AuthId: Unpin, ProductId: Unpin,

§

impl<AuthId, ProductId> UnwindSafe for Submission<AuthId, ProductId>
where AuthId: UnwindSafe, ProductId: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.