Struct EventType

Source
pub struct EventType<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> EventType<'a>

Source

pub async fn list( &self, options: Option<EventTypeListOptions>, ) -> Result<ListResponseEventTypeOut>

Return the list of event types.

Source

pub async fn create( &self, event_type_in: EventTypeIn, options: Option<PostOptions>, ) -> Result<EventTypeOut>

Create new or unarchive existing event type.

Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.

Source

pub async fn get(&self, event_type_name: String) -> Result<EventTypeOut>

Get an event type.

Source

pub async fn update( &self, event_type_name: String, event_type_update: EventTypeUpdate, ) -> Result<EventTypeOut>

Update an event type.

Source

pub async fn patch( &self, event_type_name: String, event_type_patch: EventTypePatch, ) -> Result<EventTypeOut>

Partially update an event type.

Source

pub async fn delete(&self, event_type_name: String) -> Result<()>

Archive an event type.

Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the create operation.

Source

pub async fn import_openapi( &self, event_type_import_open_api_in: EventTypeImportOpenApiIn, options: Option<PostOptions>, ) -> Result<EventTypeImportOpenApiOut>

Given an OpenAPI spec, create new or update existing event types.

If an existing archived event type is updated, it will be unarchived.

The importer will convert all webhooks found in the either the webhooks or x-webhooks top-level.

Auto Trait Implementations§

§

impl<'a> Freeze for EventType<'a>

§

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

§

impl<'a> Send for EventType<'a>

§

impl<'a> Sync for EventType<'a>

§

impl<'a> Unpin for EventType<'a>

§

impl<'a> !UnwindSafe for EventType<'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> 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, 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.
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,