pub struct PostHandler { /* private fields */ }Expand description
Handler for Post methods
Implementations§
Source§impl PostHandler
impl PostHandler
Sourcepub fn new(client: Client) -> Self
pub fn new(client: Client) -> Self
Creates a new PostHandler with a Client instance
Sourcepub fn create(&self, body: String) -> PostCreationBuilder
pub fn create(&self, body: String) -> PostCreationBuilder
Creates a PostCreationBuilder with the desired body.
Sourcepub async fn publish(&self, post: PostCreation) -> Result<Post, ApiError>
pub async fn publish(&self, post: PostCreation) -> Result<Post, ApiError>
Publishes a previously-made PostCreation instance
Trait Implementations§
Source§impl Clone for PostHandler
impl Clone for PostHandler
Source§fn clone(&self) -> PostHandler
fn clone(&self) -> PostHandler
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 PostHandler
impl RefUnwindSafe for PostHandler
impl Send for PostHandler
impl Sync for PostHandler
impl Unpin for PostHandler
impl UnwindSafe for PostHandler
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