pub struct A2aServerState { /* private fields */ }Expand description
A2A Server State containing shared resources
Implementations§
Source§impl A2aServerState
impl A2aServerState
Sourcepub fn new(task_manager: TaskManager, agent_card: AgentCard) -> Self
pub fn new(task_manager: TaskManager, agent_card: AgentCard) -> Self
Create a new server state
Sourcepub fn new_with_auth_token(
task_manager: TaskManager,
agent_card: AgentCard,
auth_token: impl Into<String>,
) -> Result<Self>
pub fn new_with_auth_token( task_manager: TaskManager, agent_card: AgentCard, auth_token: impl Into<String>, ) -> Result<Self>
Create a new server state with a caller-supplied bearer token.
Sourcepub fn auth_token(&self) -> &str
pub fn auth_token(&self) -> &str
Return the bearer token clients must use for protected endpoints.
Trait Implementations§
Source§impl Clone for A2aServerState
impl Clone for A2aServerState
Auto Trait Implementations§
impl !RefUnwindSafe for A2aServerState
impl !UnwindSafe for A2aServerState
impl Freeze for A2aServerState
impl Send for A2aServerState
impl Sync for A2aServerState
impl Unpin for A2aServerState
impl UnsafeUnpin for A2aServerState
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