pub struct AuthRecord {
pub bidder_id: BidderId,
pub auth_id: AuthId,
pub portfolio: Option<Portfolio>,
pub data: Option<AuthData>,
pub version: OffsetDateTime,
pub trade: Option<f64>,
}Expand description
A full description of an authorization
An AuthRecord combines all the information needed to define an authorization:
- Who owns it (bidder_id)
- What it trades (portfolio)
- How it can be traded (data)
- The current accumulated trade (trade)
Fields§
§bidder_id: BidderIdThe responsible bidder’s id
auth_id: AuthIdA unique id for the auth
portfolio: Option<Portfolio>The portfolio associated to the auth. Due to the expected size, this portfolio may be omitted from certain endpoints.
data: Option<AuthData>The constraint data for the authorization
version: OffsetDateTimeThe “last-modified-or-created” time as recorded by the system
trade: Option<f64>The amount of cumulative trade associated to this authorization, as-of the request time
Implementations§
Source§impl AuthRecord
impl AuthRecord
Sourcepub fn into_solver(self, scale: f64) -> Option<(AuthId, Auth<ProductId>)>
pub fn into_solver(self, scale: f64) -> Option<(AuthId, Auth<ProductId>)>
Converts this auth record into a solver-compatible format.
This method applies the time scale to rate-based constraints and computes the appropriate trade bounds for the auction, taking into account the current accumulated trade.
Trait Implementations§
Source§impl ComposeSchema for AuthRecord
impl ComposeSchema for AuthRecord
Source§impl Debug for AuthRecord
impl Debug for AuthRecord
Source§impl<'de> Deserialize<'de> for AuthRecord
impl<'de> Deserialize<'de> for AuthRecord
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
Source§impl PartialEq for AuthRecord
impl PartialEq for AuthRecord
Source§impl Serialize for AuthRecord
impl Serialize for AuthRecord
Source§impl ToSchema for AuthRecord
impl ToSchema for AuthRecord
impl StructuralPartialEq for AuthRecord
Auto Trait Implementations§
impl Freeze for AuthRecord
impl RefUnwindSafe for AuthRecord
impl Send for AuthRecord
impl Sync for AuthRecord
impl Unpin for AuthRecord
impl UnwindSafe for AuthRecord
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