Skip to main content

Ask

Struct Ask 

Source
pub struct Ask<'a> {
    pub forge: Forge,
    pub repo: &'a str,
    pub reference: &'a Reference,
    pub base: Option<&'a str>,
    pub host: Option<&'a str>,
    pub apply: bool,
    pub seatable: &'a dyn Fn(&str) -> Result<(), RkError>,
}
Expand description

What one call asks the forge for.

Fields§

§forge: Forge

The forge to act on.

§repo: &'a str

The project path.

§reference: &'a Reference

The issue, as the operator named it.

§base: Option<&'a str>

The remote branch a new branch starts from.

§host: Option<&'a str>

The API host to name explicitly, where one has to be named.

glab api resolves its host from the working directory and falls back to gitlab.com, which is right for a clone whose remote it can read and wrong for one with no remote: there, a self-managed issue URL would be acted on at gitlab.com. So this carries the reference’s host and not the remote’s — a remote names a transport host, which an instance may serve under another name.

§apply: bool

Whether to write, at the forge and afterwards.

§seatable: &'a dyn Fn(&str) -> Result<(), RkError>

Every local refusal the seat carries, run where the forge lets rk know the name before it writes.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Ask<'a>

§

impl<'a> !Send for Ask<'a>

§

impl<'a> !Sync for Ask<'a>

§

impl<'a> !UnwindSafe for Ask<'a>

§

impl<'a> Freeze for Ask<'a>

§

impl<'a> Unpin for Ask<'a>

§

impl<'a> UnsafeUnpin for Ask<'a>

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.