Skip to main content

Module server

Module server 

Source
Expand description

This module provides a high-level access to the server-side of Tango.

Structs§

Attr
An attribute of a single device, together with the last value written to it, which Tango keeps aside from the model, and its configuration on that device. Its definition is shared the way that of a [Command] is.
AttrDef
A builder for defining an attribute of a device.
Class
ClassDef
A builder for defining a device model and interface.
Command
A command of a single device, which is what the server runs when a client asks for it, around the definition it was defined with.
CommandDef
A builder for defining a command of a device.
Dev
The handle to a device from within its own execution functions, giving access to the device outside of its model.
Ref
A reference to something a server owns, which derefs to it but never gives out the Arc it holds, and borrows what it was given by: this is what keeps the users of a server from keeping any of it alive past the shutdown of that server, since ownership is cyclic and only broken by that shutdown, see server::ServerHandle.
Server
The shared state of a server, co-owned by the ServerHandle and by every class of it.
ServerArgs
The command line every server is launched with: the instance it runs as, how much it logs, and where it listens.
ServerBuilder
What a server is built with, and served by, see Self::serve.
ServerHandle
The handle to a server being served, which is what owns it on behalf of its caller.
WeakRef
A weak reference to something a server owns, see Ref::downgrade, which keeps nothing of it alive and can therefore be kept anywhere, a thread of its own in particular. What it upgrades into is a Ref borrowed from it, so that it is only held for as long as it is used.

Traits§

AnyClass
A class of any model, which is how the server holds its classes.
AnyDev
The model-erased view of a Dev, which is how a server refers to the devices it serves, whatever the model of the class they belong to.
Model
What a device model has to be, gathering in one bound everything a server needs of it: it is shared between the threads serving the requests, and it lives as long as the class it belongs to, which is as long as the server serving it.