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.
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request