pub struct BlockingIriClient { /* private fields */ }Expand description
Implementations§
Source§impl BlockingIriClient
impl BlockingIriClient
Sourcepub fn new(base_url: impl AsRef<str>) -> Result<Self, ClientError>
pub fn new(base_url: impl AsRef<str>) -> Result<Self, ClientError>
Creates a client with an explicit base URL.
Sourcepub fn from_openapi_default_server() -> Result<Self, ClientError>
pub fn from_openapi_default_server() -> Result<Self, ClientError>
Creates a client using the first server URL from the OpenAPI spec.
Returns a new client with a raw access token attached to all requests.
This sets Authorization: <token> (without Bearer prefix).
Sourcepub fn operations() -> &'static [OperationDefinition]
pub fn operations() -> &'static [OperationDefinition]
Returns all operations discovered from the OpenAPI spec.
Sourcepub fn request_json_with_query(
&self,
method: Method,
path: &str,
query: &[(&str, &str)],
body: Option<Value>,
) -> Result<Value, ClientError>
pub fn request_json_with_query( &self, method: Method, path: &str, query: &[(&str, &str)], body: Option<Value>, ) -> Result<Value, ClientError>
Sends a request using a raw path and method.
This bypasses operation-id lookup but keeps IRI client configuration.
Sourcepub fn call_operation(
&self,
operation_id: &str,
path_params: &[(&str, &str)],
query: &[(&str, &str)],
body: Option<Value>,
) -> Result<Value, ClientError>
pub fn call_operation( &self, operation_id: &str, path_params: &[(&str, &str)], query: &[(&str, &str)], body: Option<Value>, ) -> Result<Value, ClientError>
Calls an endpoint by OpenAPI operation_id.
path_params replaces {param} segments in the operation path template.
Missing required parameters return
ClientError::MissingPathParameter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockingIriClient
impl !RefUnwindSafe for BlockingIriClient
impl Send for BlockingIriClient
impl Sync for BlockingIriClient
impl Unpin for BlockingIriClient
impl UnsafeUnpin for BlockingIriClient
impl !UnwindSafe for BlockingIriClient
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