pub struct Class<M: Model> { /* private fields */ }Implementations§
Source§impl<M: Model> Class<M>
impl<M: Model> Class<M>
pub fn name(&self) -> &str
pub fn server(&self) -> &Server
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 del_prop_async<Names: ToNamesNotAll>(
&self,
names: Names,
) -> impl Future<Output = Result<()>> + Send
pub fn del_prop_async<Names: ToNamesNotAll>( &self, names: Names, ) -> impl Future<Output = Result<()>> + Send
Delete the given properties of this class.
Sourcepub fn del_prop<Names: ToNamesNotAll>(&self, names: Names) -> Result<()>
pub fn del_prop<Names: ToNamesNotAll>(&self, names: Names) -> Result<()>
Delete the given properties of this class, see Self::del_prop_async.
pub fn def(&self) -> &ClassDef<M>
Trait Implementations§
Auto Trait Implementations§
impl<M> !Freeze for Class<M>
impl<M> !RefUnwindSafe for Class<M>
impl<M> !UnwindSafe for Class<M>
impl<M> Send for Class<M>
impl<M> Sync for Class<M>
impl<M> Unpin for Class<M>
impl<M> UnsafeUnpin for Class<M>
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