pub struct Release {
pub name: String,
pub body: String,
pub tag: String,
pub date_created: String,
pub assets: Vec<ReleaseAsset>,
}
Fields§
§name: String
§body: String
§tag: String
§date_created: String
§assets: Vec<ReleaseAsset>
Implementations§
Source§impl Release
impl Release
pub fn parse(release: &Value) -> Result<Release>
Sourcepub fn has_target_asset(&self, target: &str) -> bool
pub fn has_target_asset(&self, target: &str) -> bool
Check if release has an asset who’s name contains the specified target
Sourcepub fn asset_for(&self, target: &str) -> Option<ReleaseAsset>
pub fn asset_for(&self, target: &str) -> Option<ReleaseAsset>
Return the first ReleaseAsset
for the current release who’s name
contains the specified target
pub fn version(&self) -> &str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Release
impl RefUnwindSafe for Release
impl Send for Release
impl Sync for Release
impl Unpin for Release
impl UnwindSafe for Release
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> 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