pub struct Server { /* private fields */ }Expand description
An OPC-UA server serving an AddressSpace over the SecureChannel/UACP
transport. Drive it by feeding each received UACP message to
process; the returned bytes (if any) are the response to
send back.
Implementations§
Source§impl Server
impl Server
Sourcepub fn new(endpoint_url: impl Into<String>, address_space: AddressSpace) -> Self
pub fn new(endpoint_url: impl Into<String>, address_space: AddressSpace) -> Self
Creates a server serving address_space at endpoint_url.
Sourcepub fn address_space_mut(&mut self) -> &mut AddressSpace
pub fn address_space_mut(&mut self) -> &mut AddressSpace
Mutable access to the served AddressSpace.
Sourcepub fn process(
&mut self,
incoming: &[u8],
) -> Result<Option<Vec<u8>>, ServerError>
pub fn process( &mut self, incoming: &[u8], ) -> Result<Option<Vec<u8>>, ServerError>
Processes one received UACP message, returning the response to send
(or None for messages that need no reply, e.g. CloseSecureChannel).
§Errors
ServerError on a malformed message or protocol-state violation.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Freeze for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
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