pub struct FeedWriter { /* private fields */ }Expand description
Writer bound to a (signer, topic) pair. Owner is derived from
the signer.
Implementations§
Source§impl FeedWriter
impl FeedWriter
Sourcepub fn owner(&self) -> &EthAddress
pub fn owner(&self) -> &EthAddress
Owner address derived from the signer.
Sourcepub fn reader(&self) -> &FeedReader
pub fn reader(&self) -> &FeedReader
Read side of this writer.
Sourcepub async fn upload_payload(
&self,
batch_id: &BatchId,
data: &[u8],
) -> Result<UploadResult, Error>
pub async fn upload_payload( &self, batch_id: &BatchId, data: &[u8], ) -> Result<UploadResult, Error>
Update the feed at the next available index. Mirrors bee-js
FeedWriter.uploadPayload.
Sourcepub async fn upload_reference(
&self,
batch_id: &BatchId,
reference: &Reference,
index: Option<u64>,
) -> Result<UploadResult, Error>
pub async fn upload_reference( &self, batch_id: &BatchId, reference: &Reference, index: Option<u64>, ) -> Result<UploadResult, Error>
Update the feed to point at reference. Mirrors bee-js
FeedWriter.uploadReference.
Sourcepub async fn upload_payload_at(
&self,
batch_id: &BatchId,
index: u64,
data: &[u8],
) -> Result<UploadResult, Error>
pub async fn upload_payload_at( &self, batch_id: &BatchId, index: u64, data: &[u8], ) -> Result<UploadResult, Error>
Update the feed at a specific index.
Trait Implementations§
Source§impl Clone for FeedWriter
impl Clone for FeedWriter
Source§fn clone(&self) -> FeedWriter
fn clone(&self) -> FeedWriter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FeedWriter
impl !RefUnwindSafe for FeedWriter
impl Send for FeedWriter
impl Sync for FeedWriter
impl Unpin for FeedWriter
impl UnsafeUnpin for FeedWriter
impl !UnwindSafe for FeedWriter
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