pub struct Request {
pub operation: Operation,
pub identity: Identity,
pub workspace_path: Option<String>,
pub base: Option<String>,
}Expand description
One request from an orchestrator adapter.
Fields§
§operation: OperationWhich lifecycle step.
identity: IdentityThe binding this request is about.
workspace_path: Option<String>Workspace directory, required by checkpoint.
base: Option<String>Exact base revision, when the caller pins one itself instead of
resolving base_ref.
Implementations§
Source§impl Request
impl Request
Sourcepub fn parse(value: &Value, config: &Config) -> Result<Self, Failure>
pub fn parse(value: &Value, config: &Config) -> Result<Self, Failure>
Parses a request against operator config.
The scheme is named by the caller rather than inferred from which fields are present. Inferring it would make a typo in a field name silently select the other scheme, and the two derive different change ids for the same work.
§Errors
Returns a Failure when the protocol version, operation, or
the fields the named scheme requires are missing or unusable.
Trait Implementations§
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
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