pub struct ModeClient<'sr> { /* private fields */ }
Expand description
The subject client
Implementations§
Source§impl ModeClient<'_>
impl ModeClient<'_>
Sourcepub async fn get(&self) -> Result<Mode, SchemaRegistryError>
pub async fn get(&self) -> Result<Mode, SchemaRegistryError>
Get the current mode for Schema Registry at a global level.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn set(
&self,
mode: Mode,
force: Option<bool>,
) -> Result<Mode, SchemaRegistryError>
pub async fn set( &self, mode: Mode, force: Option<bool>, ) -> Result<Mode, SchemaRegistryError>
Update the global Schema Registry mode.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn get_subject(
&self,
subject: &SubjectName,
) -> Result<Mode, SchemaRegistryError>
pub async fn get_subject( &self, subject: &SubjectName, ) -> Result<Mode, SchemaRegistryError>
Get the mode for a subject.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn set_subject(
&self,
subject: &SubjectName,
mode: Mode,
force: Option<bool>,
) -> Result<Mode, SchemaRegistryError>
pub async fn set_subject( &self, subject: &SubjectName, mode: Mode, force: Option<bool>, ) -> Result<Mode, SchemaRegistryError>
Update the mode for the specified subject.
§Errors
Fail if we cannot send the query Fail if the schema registry return an error
Sourcepub async fn delete_subject(
&self,
subject: &SubjectName,
) -> Result<Mode, SchemaRegistryError>
pub async fn delete_subject( &self, subject: &SubjectName, ) -> Result<Mode, SchemaRegistryError>
Deletes the subject-level mode for the specified subject and reverts to the global default.
§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 ModeClient<'sr>
impl<'sr> !RefUnwindSafe for ModeClient<'sr>
impl<'sr> Send for ModeClient<'sr>
impl<'sr> Sync for ModeClient<'sr>
impl<'sr> Unpin for ModeClient<'sr>
impl<'sr> !UnwindSafe for ModeClient<'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