Struct atomic_lib::commit::Commit [−][src]
A Commit is a set of changes to a Resource. Use CommitBuilder if you're programmatically constructing a Delta.
Fields
subject: String
The subject URL that is to be modified by this Delta
created_at: i64
The date it was created, as a unix timestamp
signer: String
The URL of the one signing this Commit
set: Option<HashMap<String, Value>>
The set of PropVals that need to be added. Overwrites existing values
remove: Option<Vec<String>>
The set of property URLs that need to be removed
destroy: Option<bool>
If set to true, deletes the entire resource
signature: Option<String>
Base64 encoded signature of the JSON serialized Commit
Implementations
impl Commit
[src]
pub fn from_resource(resource: Resource) -> AtomicResult<Commit>
[src]
Converts a Resource of a Commit into a Commit
pub fn into_resource(self, store: &impl Storelike) -> AtomicResult<Resource>
[src]
Converts the Commit into a Resource with Atomic Values. Creates an identifier using the base_url Works for both Signed and Unsigned Commits
pub fn get_subject(&self) -> &str
[src]
pub fn serialize_deterministically_json_ad(
&self,
store: &impl Storelike
) -> AtomicResult<String>
[src]
&self,
store: &impl Storelike
) -> AtomicResult<String>
Generates a deterministic serialized JSON-AD representation of the Commit. Does not contain the signature, since this function is used to check if the signature is correct.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Commit
[src]
impl Send for Commit
[src]
impl Sync for Commit
[src]
impl Unpin for Commit
[src]
impl UnwindSafe for Commit
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,