pub struct SocWriter { /* private fields */ }Expand description
Reader + writer for SOCs signed by a known PrivateKey.
Implementations§
Source§impl SocWriter
impl SocWriter
Sourcepub fn owner(&self) -> &EthAddress
pub fn owner(&self) -> &EthAddress
Owner address derived from the signer.
Sourcepub async fn upload(
&self,
batch_id: &BatchId,
identifier: &Identifier,
data: &[u8],
opts: Option<&UploadOptions>,
) -> Result<UploadResult, Error>
pub async fn upload( &self, batch_id: &BatchId, identifier: &Identifier, data: &[u8], opts: Option<&UploadOptions>, ) -> Result<UploadResult, Error>
Sign and upload a SOC for identifier with data. Returns
the SOC reference (= keccak256(identifier || owner)).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SocWriter
impl !RefUnwindSafe for SocWriter
impl Send for SocWriter
impl Sync for SocWriter
impl Unpin for SocWriter
impl UnsafeUnpin for SocWriter
impl !UnwindSafe for SocWriter
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