pub struct ArchiveAuthorization {
pub format_version: u16,
pub id: String,
pub workspace: String,
pub prev_revision: ContentHash,
}Expand description
Owner-signed authorization carried into a node-authored physical workspace archive operation.
This is separate from ViewOp: submitting the authorization to the
raw operation endpoint cannot detach a workspace. The archive endpoint
first moves the filesystem, then the node wraps this proof in
OpKind::ArchiveChange and submits that operation under its own key.
Fields§
§format_version: u16Wire-format version; see FORMAT_VERSION.
id: StringStable logical contribution id.
workspace: StringCurrently active workspace.
prev_revision: ContentHashExpected current change/workspace revision.
Implementations§
Source§impl ArchiveAuthorization
impl ArchiveAuthorization
Sourcepub fn new(id: String, workspace: String, prev_revision: ContentHash) -> Self
pub fn new(id: String, workspace: String, prev_revision: ContentHash) -> Self
Creates an authorization at the current wire-format version.
Sourcepub fn to_payload(&self) -> Vec<u8> ⓘ
pub fn to_payload(&self) -> Vec<u8> ⓘ
Canonical bytes covered by the owner’s submission signature.
Sourcepub fn from_payload(payload: &[u8]) -> Result<Self, ViewError>
pub fn from_payload(payload: &[u8]) -> Result<Self, ViewError>
Decodes signed authorization bytes.
Trait Implementations§
Source§impl Clone for ArchiveAuthorization
impl Clone for ArchiveAuthorization
Source§fn clone(&self) -> ArchiveAuthorization
fn clone(&self) -> ArchiveAuthorization
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 ArchiveAuthorization
impl Debug for ArchiveAuthorization
Source§impl<'de> Deserialize<'de> for ArchiveAuthorization
impl<'de> Deserialize<'de> for ArchiveAuthorization
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 ArchiveAuthorization
impl PartialEq for ArchiveAuthorization
Source§fn eq(&self, other: &ArchiveAuthorization) -> bool
fn eq(&self, other: &ArchiveAuthorization) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ArchiveAuthorization
impl Serialize for ArchiveAuthorization
impl Eq for ArchiveAuthorization
impl StructuralPartialEq for ArchiveAuthorization
Auto Trait Implementations§
impl Freeze for ArchiveAuthorization
impl RefUnwindSafe for ArchiveAuthorization
impl Send for ArchiveAuthorization
impl Sync for ArchiveAuthorization
impl Unpin for ArchiveAuthorization
impl UnsafeUnpin for ArchiveAuthorization
impl UnwindSafe for ArchiveAuthorization
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