[−][src]Struct atomic_lib::commit::Commit
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: u64
The date it was created, as a unix timestamp
signer: String
The URL of the one signing this Commit
set: Option<HashMap<String, String>>
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 into_resource<'a>(
self,
store: &'a dyn Storelike
) -> AtomicResult<Resource<'a>>
[src]
self,
store: &'a dyn Storelike
) -> AtomicResult<Resource<'a>>
Converts the Commit into a HashMap of strings. Creates an identifier using the base_url or a default.
pub fn serialize_deterministically(&self) -> AtomicResult<String>
[src]
Generates a deterministic serialized JSON representation of the Commit. Does not contain the signature, since this function is used to check if the signature is correct.
Trait Implementations
impl Debug for Commit
[src]
impl<'de> Deserialize<'de> for Commit
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Commit
[src]
Auto Trait Implementations
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnwindSafe for Commit
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,