pub struct Class<M: Model> { /* private fields */ }Expand description
A class of a server, through which its devices reach its definition and the properties the database holds for it.
Implementations§
Source§impl<M: Model> Class<M>
impl<M: Model> Class<M>
Sourcepub async fn list_prop_async(&self, filter: &str) -> Result<Spectrum<str>>
pub async fn list_prop_async(&self, filter: &str) -> Result<Spectrum<str>>
The names of the properties of this class that match the given filter.
Sourcepub fn list_prop(&self, filter: &str) -> Result<Spectrum<str>>
pub fn list_prop(&self, filter: &str) -> Result<Spectrum<str>>
The names of the properties of this class, see Self::list_prop_async.
Sourcepub fn get_prop_async<Spec, Names: ToNames>(
&self,
names: Names,
) -> impl Future<Output = Result<Spec::Output>> + Sendwhere
Spec: GetPropSpec<Names>,
pub fn get_prop_async<Spec, Names: ToNames>(
&self,
names: Names,
) -> impl Future<Output = Result<Spec::Output>> + Sendwhere
Spec: GetPropSpec<Names>,
The properties of this class, parsed into the shape the given names ask for, see
crate::database::DatabaseProxy::get_class_prop.
Sourcepub fn get_prop<Spec, Names: ToNames>(
&self,
names: Names,
) -> Result<Spec::Output>where
Spec: GetPropSpec<Names>,
pub fn get_prop<Spec, Names: ToNames>(
&self,
names: Names,
) -> Result<Spec::Output>where
Spec: GetPropSpec<Names>,
The properties of this class, see Self::get_prop_async.
Sourcepub fn set_prop_async<'a, Spec>(
&'a self,
spec: Spec,
) -> impl Future<Output = Result<()>> + Sendwhere
Spec: SetPropSpec<'a>,
pub fn set_prop_async<'a, Spec>(
&'a self,
spec: Spec,
) -> impl Future<Output = Result<()>> + Sendwhere
Spec: SetPropSpec<'a>,
Write the given properties of this class.
Sourcepub fn set_prop<'a, Spec>(&'a self, spec: Spec) -> Result<()>where
Spec: SetPropSpec<'a>,
pub fn set_prop<'a, Spec>(&'a self, spec: Spec) -> Result<()>where
Spec: SetPropSpec<'a>,
Write the given properties of this class, see Self::set_prop_async.
Sourcepub fn delete_prop_async<Names: ToNamesNotAll>(
&self,
names: Names,
) -> impl Future<Output = Result<()>> + Send
pub fn delete_prop_async<Names: ToNamesNotAll>( &self, names: Names, ) -> impl Future<Output = Result<()>> + Send
Delete the given properties of this class.
Sourcepub fn delete_prop<Names: ToNamesNotAll>(&self, names: Names) -> Result<()>
pub fn delete_prop<Names: ToNamesNotAll>(&self, names: Names) -> Result<()>
Delete the given properties of this class, see Self::delete_prop_async.
Sourcepub fn add_dev(&self, name: &str) -> Result<Arc<Dev<M>>>
pub fn add_dev(&self, name: &str) -> Result<Arc<Dev<M>>>
Add a device of that class to the server, whose name has to be a valid
domain/family/member one, see name::check_tango_dev_name, and unique
server-wide.
The device is only registered: it is initialized, served and exported by the next
Server::sync_async.