pub struct BenchPlatform { /* private fields */ }Implementations§
Source§impl BenchPlatform
impl BenchPlatform
Sourcepub fn new(
credential: impl Into<String>,
endpoint: &str,
) -> Result<Self, PlatformError>
pub fn new( credential: impl Into<String>, endpoint: &str, ) -> Result<Self, PlatformError>
Supply a Bench API key or short-lived Bench OAuth token. An empty credential permits public login/catalog operations only.
Sourcepub fn set_credential(&mut self, credential: impl Into<String>)
pub fn set_credential(&mut self, credential: impl Into<String>)
Replace an expired OAuth token; never put credentials in source or logs.
pub fn operations(&self) -> Value
Sourcepub async fn call(
&self,
operation: &str,
input: PlatformRequest,
) -> Result<Value, PlatformError>
pub async fn call( &self, operation: &str, input: PlatformRequest, ) -> Result<Value, PlatformError>
One operation, one request. No retries or implicit evaluation spending. NDJSON results are returned as an event array; stream errors are errors.
Auto Trait Implementations§
impl !RefUnwindSafe for BenchPlatform
impl !UnwindSafe for BenchPlatform
impl Freeze for BenchPlatform
impl Send for BenchPlatform
impl Sync for BenchPlatform
impl Unpin for BenchPlatform
impl UnsafeUnpin for BenchPlatform
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