pub struct MqRestSessionBuilder { /* private fields */ }Expand description
Builder for constructing an MqRestSession.
Implementations§
Source§impl MqRestSessionBuilder
impl MqRestSessionBuilder
Sourcepub fn new(
rest_base_url: impl Into<String>,
qmgr_name: impl Into<String>,
credentials: Credentials,
) -> Self
pub fn new( rest_base_url: impl Into<String>, qmgr_name: impl Into<String>, credentials: Credentials, ) -> Self
Create a new builder with required parameters.
Sourcepub fn gateway_qmgr(self, name: impl Into<String>) -> Self
pub fn gateway_qmgr(self, name: impl Into<String>) -> Self
Set the gateway queue manager name.
Sourcepub const fn verify_tls(self, verify: bool) -> Self
pub const fn verify_tls(self, verify: bool) -> Self
Set whether to verify TLS certificates.
Sourcepub const fn timeout_seconds(self, timeout: Option<f64>) -> Self
pub const fn timeout_seconds(self, timeout: Option<f64>) -> Self
Set the HTTP request timeout in seconds.
Sourcepub const fn map_attributes(self, enabled: bool) -> Self
pub const fn map_attributes(self, enabled: bool) -> Self
Set whether to map attributes between snake_case and MQSC names.
Sourcepub const fn mapping_strict(self, strict: bool) -> Self
pub const fn mapping_strict(self, strict: bool) -> Self
Set whether mapping failures are strict errors.
Sourcepub fn mapping_overrides(self, overrides: Value) -> Self
pub fn mapping_overrides(self, overrides: Value) -> Self
Set mapping overrides.
Sourcepub const fn mapping_overrides_mode(self, mode: MappingOverrideMode) -> Self
pub const fn mapping_overrides_mode(self, mode: MappingOverrideMode) -> Self
Set the mapping overrides mode.
Sourcepub fn csrf_token(self, token: Option<String>) -> Self
pub fn csrf_token(self, token: Option<String>) -> Self
Set the CSRF token value.
Sourcepub fn transport(self, transport: Box<dyn MqRestTransport>) -> Self
pub fn transport(self, transport: Box<dyn MqRestTransport>) -> Self
Set a custom transport implementation.
Sourcepub fn build(self) -> Result<MqRestSession>
pub fn build(self) -> Result<MqRestSession>
Build the session, performing LTPA login if needed.
§Errors
Returns an error if mapping override validation fails, certificate files cannot be read, or LTPA login fails.
Auto Trait Implementations§
impl Freeze for MqRestSessionBuilder
impl !RefUnwindSafe for MqRestSessionBuilder
impl !Send for MqRestSessionBuilder
impl !Sync for MqRestSessionBuilder
impl Unpin for MqRestSessionBuilder
impl UnsafeUnpin for MqRestSessionBuilder
impl !UnwindSafe for MqRestSessionBuilder
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