Skip to main content

tsgo_client/
lib.rs

1pub mod client;
2pub mod proto;
3pub mod symbolflags;
4
5pub struct Api {
6    client: client::Client,
7}
8impl Api {
9    pub fn with_uninitialized_client(
10        client: client::UninitializedClient,
11    ) -> Result<Api, client::ProtocolError> {
12        let client = client.init()?;
13        Ok(Api { client })
14    }
15
16    pub fn load_project<'buf>(
17        mut self,
18        buf: &'buf mut Vec<u8>,
19    ) -> Result<proto::ProjectResponse<'buf>, client::ProtocolError> {
20        self.client.load_project(buf)
21    }
22}