Struct ascom_alpaca::Server
source · pub struct Server {
pub devices: Devices,
pub info: ServerInfo,
pub listen_addr: SocketAddr,
pub discovery_port: u16,
}
Available on crate feature
server
only.Expand description
The Alpaca server.
Fields§
§devices: Devices
Registered devices.
info: ServerInfo
General server information.
listen_addr: SocketAddr
Address for the server to listen on.
discovery_port: u16
Port for the discovery server to listen on.
Implementations§
source§impl Server
impl Server
sourcepub async fn bind(self) -> Result<BoundServer>
pub async fn bind(self) -> Result<BoundServer>
Binds the Alpaca and discovery servers to local ports.
sourcepub async fn start(self) -> Result<Infallible>
pub async fn start(self) -> Result<Infallible>
Binds the Alpaca and discovery servers to local ports and starts them.
This is a convenience method that is equivalent to calling Self::bind
and BoundServer::start
.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe 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