Struct mastodon_async::mastodon::MastodonUnauthenticated
source · pub struct MastodonUnauthenticated {
pub base: Url,
/* private fields */
}
Expand description
A client for making unauthenticated requests to the public API.
Fields§
§base: Url
Which Mastodon instance to contact
Implementations§
source§impl MastodonUnauthenticated
impl MastodonUnauthenticated
sourcepub fn new(base: impl AsRef<str>) -> Result<MastodonUnauthenticated>
pub fn new(base: impl AsRef<str>) -> Result<MastodonUnauthenticated>
Create a new client for unauthenticated requests to a given Mastodon instance.
sourcepub async fn get_status(&self, id: &str) -> Result<Status>
pub async fn get_status(&self, id: &str) -> Result<Status>
GET /api/v1/statuses/:id
sourcepub async fn get_context(&self, id: &str) -> Result<Context>
pub async fn get_context(&self, id: &str) -> Result<Context>
GET /api/v1/statuses/:id/context
Trait Implementations§
source§impl Clone for MastodonUnauthenticated
impl Clone for MastodonUnauthenticated
source§fn clone(&self) -> MastodonUnauthenticated
fn clone(&self) -> MastodonUnauthenticated
Returns a copy 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 !RefUnwindSafe for MastodonUnauthenticated
impl Send for MastodonUnauthenticated
impl Sync for MastodonUnauthenticated
impl Unpin for MastodonUnauthenticated
impl !UnwindSafe for MastodonUnauthenticated
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