pub struct Factory {
pub config: Config,
pub credentials: Option<Credentials>,
/* private fields */
}Expand description
Owns HTTP client, Connect config, and optional credentials.
Fields§
§config: Config§credentials: Option<Credentials>Implementations§
Source§impl Factory
impl Factory
pub fn new(config: Config, credentials: Option<Credentials>) -> Result<Self>
pub fn require_credentials(&self) -> Result<&Credentials>
pub fn map_error(err: ConnectError) -> Error
Sourcepub fn sign_options<M: Message + Serialize>(
&self,
procedure: &str,
request: &M,
) -> Result<CallOptions>
pub fn sign_options<M: Message + Serialize>( &self, procedure: &str, request: &M, ) -> Result<CallOptions>
Build CallOptions with API-key signatures over the exact bytes that
Connect will send for the configured wire format.
Sourcepub async fn sign_options_async<M: Message + Serialize>(
&self,
procedure: &str,
request: &M,
) -> Result<CallOptions>
pub async fn sign_options_async<M: Message + Serialize>( &self, procedure: &str, request: &M, ) -> Result<CallOptions>
Async variant used by SDK network calls so timestamp-capacity backpressure never blocks a Tokio worker thread.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Factory
impl !RefUnwindSafe for Factory
impl !UnwindSafe for Factory
impl Send for Factory
impl Sync for Factory
impl Unpin for Factory
impl UnsafeUnpin for Factory
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