pub struct ModuleData(/* private fields */);Expand description
A struct containing data for multiple signaling modules, each associated with the module’s namespace.
Implementations§
Source§impl ModuleData
impl ModuleData
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new empty ModuleData.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&ModuleId, &Value)>
pub fn iter(&self) -> impl Iterator<Item = (&ModuleId, &Value)>
Get an iterator over all module data entries
Sourcepub fn get<T: SignalingModuleFrontendData>(&self) -> Result<Option<T>, Error>
pub fn get<T: SignalingModuleFrontendData>(&self) -> Result<Option<T>, Error>
Get the participant data for a specific module
Sourcepub fn insert<T: SignalingModuleFrontendData>(
&mut self,
data: &T,
) -> Result<(), Error>
pub fn insert<T: SignalingModuleFrontendData>( &mut self, data: &T, ) -> Result<(), Error>
Set the participant data for a specific module
If an entry with the namespace already exists, it will be overwritten.
If the namespace of T is None, the data will not be stored at all.
Sourcepub fn contains_key(&self, key: &ModuleId) -> bool
pub fn contains_key(&self, key: &ModuleId) -> bool
Query whether the module data contains a value for this key
Sourcepub fn remove<T: SignalingModuleFrontendData>(&mut self)
pub fn remove<T: SignalingModuleFrontendData>(&mut self)
Remove an entry by the namespace of SignalingModuleFrontendData type.
This method does not verify that the data actually can be deserialized into the requested types, it just uses its namespace and removes an entry with that namespace if it exists.
Sourcepub fn remove_key(&mut self, key: &ModuleId)
pub fn remove_key(&mut self, key: &ModuleId)
Remove an entry by its key if it exists.
Trait Implementations§
Source§impl Clone for ModuleData
impl Clone for ModuleData
Source§fn clone(&self) -> ModuleData
fn clone(&self) -> ModuleData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for ModuleData
impl ComposeSchema for ModuleData
Source§impl Debug for ModuleData
impl Debug for ModuleData
Source§impl Default for ModuleData
impl Default for ModuleData
Source§fn default() -> ModuleData
fn default() -> ModuleData
Source§impl<'de> Deserialize<'de> for ModuleData
impl<'de> Deserialize<'de> for ModuleData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl ExampleData for ModuleData
impl ExampleData for ModuleData
Source§fn example_data() -> Self
fn example_data() -> Self
Source§impl PartialEq for ModuleData
impl PartialEq for ModuleData
Source§impl Serialize for ModuleData
impl Serialize for ModuleData
Source§impl ToSchema for ModuleData
impl ToSchema for ModuleData
impl Eq for ModuleData
impl StructuralPartialEq for ModuleData
Auto Trait Implementations§
impl Freeze for ModuleData
impl RefUnwindSafe for ModuleData
impl Send for ModuleData
impl Sync for ModuleData
impl Unpin for ModuleData
impl UnwindSafe for ModuleData
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more