pub struct SocReader { /* private fields */ }Expand description
Reader for SOCs owned by a known EthAddress. Fetches each
chunk by computing its keccak256(identifier || owner) address
and verifying the recovered signer matches the owner.
Implementations§
Source§impl SocReader
impl SocReader
Sourcepub fn owner(&self) -> &EthAddress
pub fn owner(&self) -> &EthAddress
Address whose SOCs this reader downloads.
Sourcepub async fn download(
&self,
identifier: &Identifier,
) -> Result<SingleOwnerChunk, Error>
pub async fn download( &self, identifier: &Identifier, ) -> Result<SingleOwnerChunk, Error>
Fetch the SOC at keccak256(identifier || owner), parse the
wire form, and verify it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SocReader
impl !RefUnwindSafe for SocReader
impl Send for SocReader
impl Sync for SocReader
impl Unpin for SocReader
impl UnsafeUnpin for SocReader
impl !UnwindSafe for SocReader
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