Skip to main content

Destination

Enum Destination 

Source
pub enum Destination {
    GitHub {
        owner: String,
        repo: String,
    },
    Jira {
        site: String,
        project: String,
    },
    Linear {
        team: String,
    },
    Zendesk {
        subdomain: String,
    },
    Freshdesk {
        domain: String,
    },
    Intercom,
    Salesforce {
        instance: String,
    },
    HubSpot,
    Slack {
        channel: String,
    },
    Webhook {
        url: String,
    },
    Colonizer {
        repo: String,
    },
}
Expand description

Where a ticket is filed. One variant per supported tracker, because the eleven do not share a shape: a GitHub destination is an owner and repo, a webhook is a URL, and Intercom and HubSpot address nothing but the credential — the workspace/portal the token belongs to is the destination, so those variants carry no fields at all.

The fields name where to file, not who may file: an owner, a repo, a site, a channel are routing facts a venture may reasonably hold, log and persist. Most variants therefore hold no secret — Webhook is the exception, because its URL routinely carries a bearer token in its path or query — so the hand-written Debug renders a webhook URL as [redacted], following the Recipient precedent: core’s log redaction keys off the field name (is_secret_field) and cannot see inside a {:?} of this enum.

Serialize/Deserialize stay, because a destination has to be persisted and read back — it is tenant configuration (the credential proper is Credential, which refuses both) — and Serialize deliberately does not redact, because round-tripping tenant configuration has to work. The consequence: a serialised Destination::Webhook is the credential — store it where secrets go, never in a log, an event payload, or an error body.

Variants§

§

GitHub

A repository on GitHub (or GitHub Enterprise).

Fields

§owner: String

The repository’s owner (a user or organisation).

§repo: String

The repository name.

§

Jira

A project on a Jira site.

Fields

§site: String

The Jira site’s bare hostname (acme.atlassian.net) — never a scheme or path, so the Basic credential cannot be moved off the host it names.

§project: String

The project key tickets are filed under (PROJ).

§

Linear

A team on Linear.

Fields

§team: String

The team tickets are filed under.

§

Zendesk

A Zendesk subdomain.

Fields

§subdomain: String

The subdomain (acme for acme.zendesk.com).

§

Freshdesk

A Freshdesk portal.

Fields

§domain: String

The portal’s domain (acme.freshdesk.com).

§

Intercom

Intercom. The workspace is identified by the credential.

§

Salesforce

A Salesforce instance.

Fields

§instance: String

The instance’s hostname (acme.my.salesforce.com).

§

HubSpot

HubSpot. The portal is identified by the credential.

§

Slack

A Slack channel.

Fields

§channel: String

The channel ID tickets are filed into (C0123456789).

§

Webhook

A generic webhook. The URL is credential material: it is the bearer capability that lets anyone holding it file tickets, so it is redacted in Debug and adapters must treat it like a token.

Fields

§url: String

The URL to POST the ticket to.

§

Colonizer

A repository on the Colonizer automation. The repository is a routing fact, not a secret — it names where tickets land — so it prints in Debug, exactly as a GitHub repository does.

Fields

§repo: String

The repository to file into.

Implementations§

Source§

impl Destination

Source

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

The kind of tracker this destination names, for logs, metrics and error messages: "github", "jira", "linear", "zendesk", "freshdesk", "intercom", "salesforce", "hubspot", "slack", "webhook", "colonizer".

Trait Implementations§

Source§

impl Clone for Destination

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Destination

Prints the variant and its non-secret fields, never a webhook URL — a webhook endpoint is a bearer capability, and the token it carries in its path or query must not survive into a log line.

Source§

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

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

impl<'de> Deserialize<'de> for Destination

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Destination

Source§

impl Hash for Destination

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 PartialEq for Destination

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Destination

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Destination

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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, 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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more