Enum Preview

Source
pub enum Preview {
Show 33 variants Wyandotte, BarredRock, AntMan, SquirrelGirl, Mockingbird, MisterFantastic, MachineMan, Inertia, Cloak, BlackPanther, GiantSentryFist, Mercy, ScarletWitch, Hellcat, Nightshade, SailorV, Dazzler, Echo, Symmetra, Zzzax, LukeCage, Hagar, Antiope, Starfox, Fury, Flash, Surtur, Corsair, Sombra, ShadowCat, Switcheroo, Groot, Gambit,
}
Expand description

API previews.

See: https://developer.github.com/v3/previews/

Variants§

§

Wyandotte

Allows you to download repositories from your GitHub user or organization account to review, backup, and migrate data to GitHub Enterprise Server.

§

BarredRock

Import source repositories to GitHub with the API version of the GitHub Importer.

§

AntMan

Exercise greater control over deployments with more information and finer granularity.

§

SquirrelGirl

Manage reactions for commits, issues, and comments.

§

Mockingbird

Get a list of events for an issue or pull request.

§

MisterFantastic

Get more information about your GitHub Pages site.

§

MachineMan

Manage integrations through the API.

§

Inertia

Manage projects.

§

Cloak

Search commits.

§

BlackPanther

Retrieve community profile metrics (also known as community health) for any public repository.

§

GiantSentryFist

Users can block other users. Organizations can block users, too.

§

Mercy

View a list of repository topics in calls that return repository results.

§

ScarletWitch

View all codes of conduct or get which code of conduct a repository has currently.

§

Hellcat

Include nested team content in team payloads.

§

Nightshade

Transfer a repository to an organization or user.

§

SailorV

You can now add a reason when you lock an issue.

§

Dazzler

You can now use the API to invite new users to an organization by creating an organization invitation.

§

Echo

You can now use the API to manage team discussions and team discussion comments.

§

Symmetra

You can now use emoji in label names, add descriptions to labels, and search for labels in a repository.

§

Zzzax

You can now use the API to manage the setting for requiring signed commits on protected branches.

§

LukeCage

You can now require multiple approving reviews for a pull request using the API.

§

Hagar

Retrieve information from someone’s hovercard.

§

Antiope

Allows a GitHub App to run external checks on a repository’s code. See the Check runs and Check suites APIs for more details.

§

Starfox

The REST API v3 responses for issue events and issue timeline events now return the project_card field for project-related events.

§

Fury

GitHub App Manifests allow people to create preconfigured GitHub Apps. See “Creating GitHub Apps from a manifest” for more details.

§

Flash

You can now update the environment of a deployment status and use the in_progress and queued states. When you create deployment statuses, you can now use the auto_inactive parameter to mark old production deployments as inactive.

§

Surtur

You can now configure whether organization members can create repositories and which types of repositories they can create. See “Edit an organization” for more details.

§

Corsair

You can now provide more information in GitHub for URLs that link to registered domains by using the Content Attachments API. See “Using content attachments” for more details.

§

Sombra

Allows you to temporarily restrict interactions, such as commenting, opening issues, and creating pull requests, for GitHub repositories or organizations. When enabled, only the specified group of GitHub users will be able to participate in these interactions. See the Repository interactions and Organization interactions APIs for more details.

§

ShadowCat

You can use the Draft Pull Requests API and its pull request endpoints to see whether a pull request is in draft state. To learn more about draft pull requests, see “About pull requests” in the GitHub Help documentation.

§

Switcheroo

You can use the new endpoints in the Pages API to enable or disable Pages. To learn more about Pages, see “GitHub Pages Basics” in the GitHub Help documentation.

§

Groot

You can use the new endpoints in the Commits API to list branches or pull requests for a commit.

§

Gambit

Owners of GitHub Apps can now uninstall an app using the Apps API.

Implementations§

Source§

impl Preview

Source

pub fn name(self) -> &'static str

Returns the kebab-case name of the preview.

Source

pub fn media_type(self) -> String

Returns the media type for the preview. This can be used for the Accept header in requests.

Trait Implementations§

Source§

impl Clone for Preview

Source§

fn clone(&self) -> Preview

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Preview

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Preview

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Preview

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Preview

Source§

fn cmp(&self, other: &Preview) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Preview

Source§

fn eq(&self, other: &Preview) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Preview

Source§

fn partial_cmp(&self, other: &Preview) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Preview

Source§

impl Eq for Preview

Source§

impl StructuralPartialEq for Preview

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.