pub struct CommitBuilder { /* private fields */ }Expand description
Use this for creating Commits.
Implementations§
Source§impl CommitBuilder
impl CommitBuilder
Sourcepub fn push_propval(
&mut self,
property: &str,
value: SubResource,
) -> AtomicResult<()>
pub fn push_propval( &mut self, property: &str, value: SubResource, ) -> AtomicResult<()>
Appends a URL or (nested anonymous) Resource to a ResourceArray.
Sourcepub fn sign(
self,
agent: &Agent,
store: &impl Storelike,
resource: &Resource,
) -> AtomicResult<Commit>
pub fn sign( self, agent: &Agent, store: &impl Storelike, resource: &Resource, ) -> AtomicResult<Commit>
Creates the Commit and signs it using a signature.
Does not send it - see [atomic_lib::client::post_commit].
Private key is the base64 encoded pkcs8 for the signer.
Sets the previousCommit using the lastCommit.
Sourcepub fn set(&mut self, prop: String, val: Value)
pub fn set(&mut self, prop: String, val: Value)
Set Property / Value combinations that will either be created or overwritten.
Sourcepub fn set_subject(&mut self, subject: String)
pub fn set_subject(&mut self, subject: String)
Set a new subject for this Commit
Trait Implementations§
Source§impl Clone for CommitBuilder
impl Clone for CommitBuilder
Source§fn clone(&self) -> CommitBuilder
fn clone(&self) -> CommitBuilder
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 CommitBuilder
impl Debug for CommitBuilder
Source§impl<'de> Deserialize<'de> for CommitBuilder
impl<'de> Deserialize<'de> for CommitBuilder
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 CommitBuilder
impl RefUnwindSafe for CommitBuilder
impl Send for CommitBuilder
impl Sync for CommitBuilder
impl Unpin for CommitBuilder
impl UnsafeUnpin for CommitBuilder
impl UnwindSafe for CommitBuilder
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