pub struct FeedReader { /* private fields */ }Expand description
Reader bound to a (owner, topic) pair. Wraps the lower-level
FileApi feed methods for callers that prefer the bee-js
FeedReader shape.
Implementations§
Source§impl FeedReader
impl FeedReader
Sourcepub fn owner(&self) -> &EthAddress
pub fn owner(&self) -> &EthAddress
Owner address.
Sourcepub async fn download(&self) -> Result<FeedUpdate, Error>
pub async fn download(&self) -> Result<FeedUpdate, Error>
Fetch the most recent feed update.
Sourcepub async fn lookup(&self) -> Result<Reference, Error>
pub async fn lookup(&self) -> Result<Reference, Error>
Resolve the feed manifest reference (GET /feeds/{owner}/{topic}).
Sourcepub async fn next_index(&self) -> Result<u64, Error>
pub async fn next_index(&self) -> Result<u64, Error>
Index where the next feed update will be written.
Sourcepub async fn is_retrievable(
&self,
index: Option<u64>,
opts: Option<&DownloadOptions>,
) -> Result<bool, Error>
pub async fn is_retrievable( &self, index: Option<u64>, opts: Option<&DownloadOptions>, ) -> Result<bool, Error>
True iff the feed currently resolves on the network.
Trait Implementations§
Source§impl Clone for FeedReader
impl Clone for FeedReader
Source§fn clone(&self) -> FeedReader
fn clone(&self) -> FeedReader
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 FeedReader
impl !RefUnwindSafe for FeedReader
impl Send for FeedReader
impl Sync for FeedReader
impl Unpin for FeedReader
impl UnsafeUnpin for FeedReader
impl !UnwindSafe for FeedReader
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