pub struct RemoteAgent { /* private fields */ }Expand description
Builder for a remote agent reference (client-side).
ⓘ
let remote = RemoteAgent::new("verifier")
.endpoint("https://agent.example.com")
.timeout(Duration::from_secs(30))
.describe("Verifies caller identity");Implementations§
Source§impl RemoteAgent
impl RemoteAgent
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Create a new remote agent reference with the given name.
Sourcepub fn describe(self, desc: impl Into<String>) -> Self
pub fn describe(self, desc: impl Into<String>) -> Self
Set a description for this remote agent.
Sourcepub fn streaming(self, enabled: bool) -> Self
pub fn streaming(self, enabled: bool) -> Self
Enable streaming responses from the remote agent.
Sourcepub fn get_endpoint(&self) -> Option<&str>
pub fn get_endpoint(&self) -> Option<&str>
The configured endpoint.
Sourcepub fn get_timeout(&self) -> Option<Duration>
pub fn get_timeout(&self) -> Option<Duration>
The configured timeout.
Trait Implementations§
Source§impl Clone for RemoteAgent
impl Clone for RemoteAgent
Source§fn clone(&self) -> RemoteAgent
fn clone(&self) -> RemoteAgent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RemoteAgent
impl RefUnwindSafe for RemoteAgent
impl Send for RemoteAgent
impl Sync for RemoteAgent
impl Unpin for RemoteAgent
impl UnwindSafe for RemoteAgent
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