pub struct RestoreRequest {
pub backup_id: String,
pub precondition: Precondition,
}Expand description
Request to restore an environment from a named backup (#5).
precondition is mandatory and must pin prior state: a restore is never a
create, so an empty (blind) precondition could clobber a newer generation.
The field has no serde default — a request omitting it fails to deserialize
— and RestoreRequest::validate additionally rejects a present-but-empty
precondition.
Fields§
§backup_id: String§precondition: PreconditionImplementations§
Source§impl RestoreRequest
impl RestoreRequest
Sourcepub fn validate(&self) -> Result<(), RemoteContractError>
pub fn validate(&self) -> Result<(), RemoteContractError>
Reject a restore that pins no prior state (an empty precondition).
Trait Implementations§
Source§impl Clone for RestoreRequest
impl Clone for RestoreRequest
Source§fn clone(&self) -> RestoreRequest
fn clone(&self) -> RestoreRequest
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 RestoreRequest
impl Debug for RestoreRequest
Source§impl<'de> Deserialize<'de> for RestoreRequest
impl<'de> Deserialize<'de> for RestoreRequest
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
Auto Trait Implementations§
impl Freeze for RestoreRequest
impl RefUnwindSafe for RestoreRequest
impl Send for RestoreRequest
impl Sync for RestoreRequest
impl Unpin for RestoreRequest
impl UnsafeUnpin for RestoreRequest
impl UnwindSafe for RestoreRequest
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