Skip to main content

Remote

Trait Remote 

Source
pub trait Remote: GitLike {
    // Required methods
    fn request_package_release(
        &self,
        package: &str,
        version: BumpOrVersion,
    ) -> Result<(), Self::Error>;
    fn get_changelog_release(
        &self,
        package: &str,
        version: &Version,
        is_primary: bool,
    ) -> Result<Release, Self::Error>;
    fn create_pull_request(
        &self,
        head: &str,
        base: &str,
        title: &str,
        body: &str,
    ) -> Result<u64, Self::Error>;
    fn create_release(
        &self,
        tag: &str,
        sha: &str,
        name: &str,
        body: &str,
        prerelease: bool,
        latest: bool,
    ) -> Result<u64, Self::Error>;
}
Expand description

A remote repository.

This defines the shared API of a remote repository to simplify feature flag handling.

Required Methods§

Source

fn request_package_release( &self, package: &str, version: BumpOrVersion, ) -> Result<(), Self::Error>

Requests a package release.

Source

fn get_changelog_release( &self, package: &str, version: &Version, is_primary: bool, ) -> Result<Release, Self::Error>

Gets the changelog release for the given package version.

Source

fn create_pull_request( &self, head: &str, base: &str, title: &str, body: &str, ) -> Result<u64, Self::Error>

Creates a pull request.

Source

fn create_release( &self, tag: &str, sha: &str, name: &str, body: &str, prerelease: bool, latest: bool, ) -> Result<u64, Self::Error>

Creates a release.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Remote for &T
where T: Remote,

Source§

fn request_package_release( &self, package: &str, version: BumpOrVersion, ) -> Result<(), Self::Error>

Source§

fn get_changelog_release( &self, package: &str, version: &Version, is_primary: bool, ) -> Result<Release, Self::Error>

Source§

fn create_pull_request( &self, head: &str, base: &str, title: &str, body: &str, ) -> Result<u64, Self::Error>

Source§

fn create_release( &self, tag: &str, sha: &str, name: &str, body: &str, prerelease: bool, latest: bool, ) -> Result<u64, Self::Error>

Source§

impl<T> Remote for &mut T
where T: Remote,

Source§

fn request_package_release( &self, package: &str, version: BumpOrVersion, ) -> Result<(), Self::Error>

Source§

fn get_changelog_release( &self, package: &str, version: &Version, is_primary: bool, ) -> Result<Release, Self::Error>

Source§

fn create_pull_request( &self, head: &str, base: &str, title: &str, body: &str, ) -> Result<u64, Self::Error>

Source§

fn create_release( &self, tag: &str, sha: &str, name: &str, body: &str, prerelease: bool, latest: bool, ) -> Result<u64, Self::Error>

Implementors§