pub struct RemoteRelay { /* private fields */ }Implementations§
Source§impl RemoteRelay
impl RemoteRelay
pub fn new(server_url: &str) -> Self
pub fn health(&self) -> Result<String, String>
pub fn register( &self, agent_id: &str, session_id: &str, pid: u32, ) -> Result<AgentRegistration, String>
pub fn unregister(&self, session_id: &str) -> Result<(), String>
pub fn agents(&self) -> Result<Vec<AgentRegistration>, String>
pub fn send( &self, from_session: &str, from_agent: &str, to_session: Option<&str>, content: &str, ) -> Result<Message, String>
pub fn send_scoped( &self, from_session: &str, from_agent: &str, to_session: Option<&str>, content: &str, team_id: Option<&str>, channel: Option<&str>, ) -> Result<Message, String>
pub fn inbox( &self, session_id: &str, limit: usize, ) -> Result<Vec<Message>, String>
pub fn inbox_scoped( &self, session_id: &str, limit: usize, team: Option<&str>, channel: Option<&str>, ) -> Result<Vec<Message>, String>
pub fn unread_count(&self, session_id: &str) -> Result<u64, String>
Sourcepub fn signup(
&self,
email: &str,
name: &str,
) -> Result<(String, String), String>
pub fn signup( &self, email: &str, name: &str, ) -> Result<(String, String), String>
Sign up for a new account. Returns (user_id, api_key).
Sourcepub fn login(&self, email: &str) -> Result<String, String>
pub fn login(&self, email: &str) -> Result<String, String>
Log in with an existing email. Returns a new api_key.
pub fn create_team(&self, api_key: &str, name: &str) -> Result<Team, String>
pub fn list_teams(&self, api_key: &str) -> Result<Vec<Team>, String>
pub fn invite( &self, api_key: &str, team_id: &str, email: Option<&str>, ) -> Result<String, String>
pub fn join_team(&self, api_key: &str, token: &str) -> Result<(), String>
pub fn list_members( &self, api_key: &str, team_id: &str, ) -> Result<Vec<TeamMember>, String>
pub fn kick_member( &self, api_key: &str, team_id: &str, user_id: &str, ) -> Result<(), String>
pub fn create_channel( &self, api_key: &str, team_id: &str, name: &str, ) -> Result<Channel, String>
pub fn list_channels( &self, api_key: &str, team_id: &str, ) -> Result<Vec<Channel>, String>
Auto Trait Implementations§
impl Freeze for RemoteRelay
impl RefUnwindSafe for RemoteRelay
impl Send for RemoteRelay
impl Sync for RemoteRelay
impl Unpin for RemoteRelay
impl UnsafeUnpin for RemoteRelay
impl UnwindSafe for RemoteRelay
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