pub struct ControlApiClient<T> { /* private fields */ }Expand description
Media server’s Control API service.
Implementations
impl<T> ControlApiClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ControlApiClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> ControlApiClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip.
pub async fn create(
&mut self,
request: impl IntoRequest<CreateRequest>
) -> Result<Response<CreateResponse>, Status>
pub async fn create(
&mut self,
request: impl IntoRequest<CreateRequest>
) -> Result<Response<CreateResponse>, Status>
Creates new Element with a given ID.
Not idempotent. Errors if an Element with the same ID already exists.
Removes Element by its ID. Allows referring multiple Elements on the last two levels.
Idempotent. If no Elements with such IDs exist, then succeeds.
pub async fn get(
&mut self,
request: impl IntoRequest<IdRequest>
) -> Result<Response<GetResponse>, Status>
pub async fn get(
&mut self,
request: impl IntoRequest<IdRequest>
) -> Result<Response<GetResponse>, Status>
Returns Element by its ID. Allows referring multiple Elements. If no ID specified, returns all Elements declared.
pub async fn apply(
&mut self,
request: impl IntoRequest<ApplyRequest>
) -> Result<Response<CreateResponse>, Status>
pub async fn apply(
&mut self,
request: impl IntoRequest<ApplyRequest>
) -> Result<Response<CreateResponse>, Status>
Applies the given spec to Element by its ID.
Idempotent. If no Element with such ID exists, then it will be created, otherwise it will be reconfigured. Elements that exist, but are not specified in the provided spec will be removed.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for ControlApiClient<T> where
T: RefUnwindSafe,
impl<T> Send for ControlApiClient<T> where
T: Send,
impl<T> Sync for ControlApiClient<T> where
T: Sync,
impl<T> Unpin for ControlApiClient<T> where
T: Unpin,
impl<T> UnwindSafe for ControlApiClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more