pub struct PolicyDecisionRow {
pub id: Uuid,
pub job_id: Uuid,
pub decision: String,
pub reason_code: String,
pub details_json: Value,
pub created_at: DateTime<Utc>,
}Expand description
Durable record explaining a queue-policy decision for one job.
§Examples
use azums::PolicyDecisionsRepo;
use sqlx::postgres::PgPoolOptions;
let pool = PgPoolOptions::new()
.connect_lazy("postgres://postgres:postgres@localhost/azums")?;
let decisions = PolicyDecisionsRepo::new(pool);
let _ = decisions;Fields§
§id: UuidUnique decision identifier.
job_id: UuidJob affected by the decision.
decision: StringDecision name such as THROTTLED or DELAYED.
reason_code: StringMachine-readable reason for the decision.
details_json: ValueStructured measurements and policy context.
created_at: DateTime<Utc>Time at which the policy decision was recorded.
Trait Implementations§
Source§impl Clone for PolicyDecisionRow
impl Clone for PolicyDecisionRow
Source§fn clone(&self) -> PolicyDecisionRow
fn clone(&self) -> PolicyDecisionRow
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 PolicyDecisionRow
impl Debug for PolicyDecisionRow
Source§impl<'a, R> FromRow<'a, R> for PolicyDecisionRowwhere
R: Row,
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
String: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Value: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
DateTime<Utc>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
impl<'a, R> FromRow<'a, R> for PolicyDecisionRowwhere
R: Row,
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
String: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Value: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
DateTime<Utc>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Auto Trait Implementations§
impl Freeze for PolicyDecisionRow
impl RefUnwindSafe for PolicyDecisionRow
impl Send for PolicyDecisionRow
impl Sync for PolicyDecisionRow
impl Unpin for PolicyDecisionRow
impl UnsafeUnpin for PolicyDecisionRow
impl UnwindSafe for PolicyDecisionRow
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,
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 more