pub struct GistManager { /* private fields */ }Expand description
Gist Manager for creating and managing GitHub Gists
Implementations§
Source§impl GistManager
impl GistManager
Sourcepub fn new(token: impl Into<String>, username: impl Into<String>) -> Self
pub fn new(token: impl Into<String>, username: impl Into<String>) -> Self
Create a new GistManager
Sourcepub async fn create_gist(
&self,
filename: impl Into<String>,
content: impl Into<String>,
_language: Option<String>,
options: GistOptions,
) -> Result<GistCreationResult>
pub async fn create_gist( &self, filename: impl Into<String>, content: impl Into<String>, _language: Option<String>, options: GistOptions, ) -> Result<GistCreationResult>
Sourcepub fn generate_gist_url(&self, gist_id: impl Into<String>) -> String
pub fn generate_gist_url(&self, gist_id: impl Into<String>) -> String
Sourcepub async fn update_gist(
&self,
gist_id: impl Into<String>,
filename: impl Into<String>,
content: impl Into<String>,
_language: Option<String>,
) -> Result<GistUpdateResult>
pub async fn update_gist( &self, gist_id: impl Into<String>, filename: impl Into<String>, content: impl Into<String>, _language: Option<String>, ) -> Result<GistUpdateResult>
Sourcepub async fn delete_gist(
&self,
gist_id: impl Into<String>,
) -> Result<GistLifecycleResult>
pub async fn delete_gist( &self, gist_id: impl Into<String>, ) -> Result<GistLifecycleResult>
Sourcepub async fn archive_gist(
&self,
gist_id: impl Into<String>,
) -> Result<GistLifecycleResult>
pub async fn archive_gist( &self, gist_id: impl Into<String>, ) -> Result<GistLifecycleResult>
Sourcepub async fn get_gist_metadata(
&self,
gist_id: impl Into<String>,
) -> Result<GistMetadata>
pub async fn get_gist_metadata( &self, gist_id: impl Into<String>, ) -> Result<GistMetadata>
Sourcepub async fn update_gist_metadata(
&self,
gist_id: impl Into<String>,
metadata: GistMetadata,
) -> Result<GistMetadata>
pub async fn update_gist_metadata( &self, gist_id: impl Into<String>, metadata: GistMetadata, ) -> Result<GistMetadata>
Sourcepub async fn set_gist_visibility(
&self,
gist_id: impl Into<String>,
public: bool,
) -> Result<Gist>
pub async fn set_gist_visibility( &self, gist_id: impl Into<String>, public: bool, ) -> Result<Gist>
Sourcepub async fn restore_gist(
&self,
gist_id: impl Into<String>,
) -> Result<GistLifecycleResult>
pub async fn restore_gist( &self, gist_id: impl Into<String>, ) -> Result<GistLifecycleResult>
Sourcepub async fn list_gists(&self) -> Result<Vec<String>>
pub async fn list_gists(&self) -> Result<Vec<String>>
Trait Implementations§
Source§impl Clone for GistManager
impl Clone for GistManager
Source§fn clone(&self) -> GistManager
fn clone(&self) -> GistManager
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 GistManager
impl RefUnwindSafe for GistManager
impl Send for GistManager
impl Sync for GistManager
impl Unpin for GistManager
impl UnwindSafe for GistManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more