pub struct MarkersHandler<'a> { /* private fields */ }Expand description
Handler for marker-related API endpoints.
Implementations§
Source§impl<'a> MarkersHandler<'a>
impl<'a> MarkersHandler<'a>
Sourcepub fn new(client: &'a MastodonClient) -> Self
pub fn new(client: &'a MastodonClient) -> Self
Creates a new MarkersHandler for the given client.
Sourcepub async fn get(&self, timelines: &[&str]) -> Result<HashMap<String, Marker>>
pub async fn get(&self, timelines: &[&str]) -> Result<HashMap<String, Marker>>
Fetches markers for the given timelines.
Parameters:
timelines: A list of timelines to fetch markers for (e.g., “home”, “notifications”).
Returns:
Result<HashMap<String, Marker>>: A map of timeline names to markers.
Corresponds to GET /api/v1/markers.
Sourcepub async fn update(&self, timeline: &str, last_read_id: &str) -> Result<Marker>
pub async fn update(&self, timeline: &str, last_read_id: &str) -> Result<Marker>
Updates or creates a marker for a timeline.
Parameters:
timeline: The timeline to update (“home” or “notifications”).last_read_id: The ID of the status to mark as read.
Returns:
Result<Marker>: The updated marker.
Corresponds to POST /api/v1/markers.
Auto Trait Implementations§
impl<'a> Freeze for MarkersHandler<'a>
impl<'a> !RefUnwindSafe for MarkersHandler<'a>
impl<'a> Send for MarkersHandler<'a>
impl<'a> Sync for MarkersHandler<'a>
impl<'a> Unpin for MarkersHandler<'a>
impl<'a> !UnwindSafe for MarkersHandler<'a>
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