pub struct SchemaClient<'sr> { /* private fields */ }
Expand description
The subject client
Implementations§
Source§impl SchemaClient<'_>
impl SchemaClient<'_>
Sourcepub async fn get(
&self,
id: SchemaId,
subject: Option<&SubjectName>,
) -> Result<Option<Schema>, SchemaRegistryError>
pub async fn get( &self, id: SchemaId, subject: Option<&SubjectName>, ) -> Result<Option<Schema>, SchemaRegistryError>
Get the schema string identified by the input ID.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn get_schema(
&self,
id: SchemaId,
subject: Option<SubjectName>,
) -> Result<Option<String>, SchemaRegistryError>
pub async fn get_schema( &self, id: SchemaId, subject: Option<SubjectName>, ) -> Result<Option<String>, SchemaRegistryError>
Retrieves only the schema identified by the input ID.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn types(&self) -> Result<Vec<SchemaType>, SchemaRegistryError>
pub async fn types(&self) -> Result<Vec<SchemaType>, SchemaRegistryError>
Get the schema types that are registered with Schema Registry.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn versions(
&self,
id: SchemaId,
) -> Result<Vec<SubjectVersion>, SchemaRegistryError>
pub async fn versions( &self, id: SchemaId, ) -> Result<Vec<SubjectVersion>, SchemaRegistryError>
Get the subject-version pairs identified by the input ID.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Trait Implementations§
Auto Trait Implementations§
impl<'sr> Freeze for SchemaClient<'sr>
impl<'sr> !RefUnwindSafe for SchemaClient<'sr>
impl<'sr> Send for SchemaClient<'sr>
impl<'sr> Sync for SchemaClient<'sr>
impl<'sr> Unpin for SchemaClient<'sr>
impl<'sr> !UnwindSafe for SchemaClient<'sr>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more