pub enum Request {
Legacy(JobSpec),
Job(JobSpec),
}Expand description
A submitted job, in the current envelope or in the legacy format.
Variants§
Legacy(JobSpec)
An fcmaes.job/0.1 job, resolved by legacy::JobSpec::resolve.
Job(JobSpec)
An optimization.job/0.1 job, checked by JobSpec::validate.
Implementations§
Source§impl Request
impl Request
Sourcepub fn parse(bytes: &[u8]) -> Result<Self>
pub fn parse(bytes: &[u8]) -> Result<Self>
Parses and validates a submitted job; every failure is invalid_job.
Sourcepub fn request_key(&self) -> &str
pub fn request_key(&self) -> &str
The caller’s idempotency key.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Request
impl Freeze for Requestwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<f64>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<Input>: Freeze,
impl Move for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Requestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<Input>: UnsafeUnpin,
impl UnwindSafe for Request
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