Struct ccsr::Client[][src]

pub struct Client { /* fields omitted */ }

An API client for a Confluent-compatible schema registry.

Implementations

impl Client[src]

pub async fn get_schema_by_id(&self, id: i32) -> Result<Schema, GetByIdError>[src]

Gets the schema with the associated ID.

pub async fn get_schema_by_subject(
    &self,
    subject: &str
) -> Result<Schema, GetBySubjectError>
[src]

Gets the latest schema for the specified subject.

pub async fn publish_schema(
    &self,
    subject: &str,
    schema: &str
) -> Result<i32, PublishError>
[src]

Publishes a new schema for the specified subject. The ID of the new schema is returned.

Note that if a schema that is identical to an existing schema for the same subject is published, the ID of the existing schema will be returned.

pub async fn list_subjects(&self) -> Result<Vec<String>, ListError>[src]

Lists the names of all subjects that the schema registry is aware of.

pub async fn delete_subject(&self, subject: &str) -> Result<(), DeleteError>[src]

Deletes all schema versions associated with the specified subject.

This API is only intended to be used in development environments. Deleting schemas only allows new, potentially incompatible schemas to be registered under the same subject. It does not allow the schema ID to be reused.

Trait Implementations

impl Debug for Client[src]

Auto Trait Implementations

impl !RefUnwindSafe for Client[src]

impl Send for Client[src]

impl Sync for Client[src]

impl Unpin for Client[src]

impl !UnwindSafe for Client[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.