Struct repo_icons::Readme
source · [−]pub struct Readme {
pub owner: String,
pub repo: String,
pub homepage: Option<Url>,
/* private fields */
}
Fields
owner: String
repo: String
homepage: Option<Url>
Implementations
sourceimpl Readme
impl Readme
pub async fn load(owner: &str, repo: &str) -> Result<Self, Box<dyn Error>>
pub fn new(
owner: &str,
repo: &str,
body: &str,
default_branch: &str,
homepage: Option<Url>
) -> Self
pub async fn images(&self) -> Vec<ReadmeImage>
sourcepub async fn is_link_to_project(&self, url: &Url) -> Option<ProjectLink>
pub async fn is_link_to_project(&self, url: &Url) -> Option<ProjectLink>
Check if a given url is a project link.
sourcepub async fn get_branch_and_path(&self, url: &Url) -> Option<(String, String)>
pub async fn get_branch_and_path(&self, url: &Url) -> Option<(String, String)>
Check if a given url points to a file located inside the repo.
pub fn qualify_url(&self, path: &str) -> Result<Url, Box<dyn Error>>
Auto Trait Implementations
impl !RefUnwindSafe for Readme
impl !Send for Readme
impl !Sync for Readme
impl Unpin for Readme
impl UnwindSafe for Readme
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more