pub struct Client { /* private fields */ }Expand description
A connected client for an opcda-bridge gateway’s gRPC API.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn connect(host: &str) -> Result<Self>
pub async fn connect(host: &str) -> Result<Self>
Connect to a plaintext gateway at host (for example, localhost:7600).
Sourcepub async fn capabilities(
&mut self,
server: impl Into<String>,
) -> Result<Capabilities>
pub async fn capabilities( &mut self, server: impl Into<String>, ) -> Result<Capabilities>
Report protocol, paging, browse-session, search, and namespace support.
Sourcepub async fn list_servers(&mut self) -> Result<Vec<String>>
pub async fn list_servers(&mut self) -> Result<Vec<String>>
List the OPC DA servers registered on the gateway’s host.
Sourcepub async fn browse(
&mut self,
server: impl Into<String>,
page_size: u32,
) -> Result<BrowsePage>
pub async fn browse( &mut self, server: impl Into<String>, page_size: u32, ) -> Result<BrowsePage>
Open a browse session and return only its first root page.
Sourcepub async fn open_browse(
&mut self,
server: impl Into<String>,
page_size: u32,
) -> Result<BrowsePage>
pub async fn open_browse( &mut self, server: impl Into<String>, page_size: u32, ) -> Result<BrowsePage>
Open a browse session and return only its first root page.
Sourcepub async fn browse_page(
&mut self,
request: BrowsePageRequest,
) -> Result<BrowsePage>
pub async fn browse_page( &mut self, request: BrowsePageRequest, ) -> Result<BrowsePage>
Request exactly one root, child, or continuation page.
This method never follows next_page_token automatically.
Sourcepub async fn close_browse_session(
&mut self,
session_id: impl Into<String>,
) -> Result<()>
pub async fn close_browse_session( &mut self, session_id: impl Into<String>, ) -> Result<()>
Explicitly release a gateway browse session.
Sourcepub async fn search_stream(
&mut self,
request: SearchRequest,
) -> Result<SearchStream>
pub async fn search_stream( &mut self, request: SearchRequest, ) -> Result<SearchStream>
Start a bounded search and return its progressive event stream.
Sourcepub async fn search(
&mut self,
request: SearchRequest,
) -> Result<Vec<SearchEvent>>
pub async fn search( &mut self, request: SearchRequest, ) -> Result<Vec<SearchEvent>>
Explicitly collect a complete search stream into memory.
Sourcepub async fn search_index_status(
&mut self,
server: impl Into<String>,
) -> Result<SearchIndexStatus>
pub async fn search_index_status( &mut self, server: impl Into<String>, ) -> Result<SearchIndexStatus>
Return the persistent namespace-index status for server.
Sourcepub async fn refresh_search_index(
&mut self,
server: impl Into<String>,
force: bool,
) -> Result<SearchIndexStatus>
pub async fn refresh_search_index( &mut self, server: impl Into<String>, force: bool, ) -> Result<SearchIndexStatus>
Start or coalesce a persistent namespace-index refresh.
Sourcepub async fn control_search_index(
&mut self,
server: impl Into<String>,
action: SearchIndexControlAction,
) -> Result<SearchIndexStatus>
pub async fn control_search_index( &mut self, server: impl Into<String>, action: SearchIndexControlAction, ) -> Result<SearchIndexStatus>
Pause, resume, or cancel a persistent namespace-index build.
Sourcepub async fn search_index(
&mut self,
request: SearchIndexRequest,
) -> Result<SearchIndexResponse>
pub async fn search_index( &mut self, request: SearchIndexRequest, ) -> Result<SearchIndexResponse>
Search the gateway-owned persistent namespace index.
This never falls back to live namespace traversal.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request