pub trait SharedContainerCommon {
Show 15 methods
// Required methods
fn container_mutability(&self) -> SharedContainerMutability;
fn value_container(&self) -> Ref<'_, ValueContainer>;
fn value_container_mut(&self) -> RefMut<'_, ValueContainer>;
fn allowed_type(&self) -> Ref<'_, TypeDefinition>;
fn is_borrowed(&self) -> bool;
fn can_mutate(&self) -> bool;
fn inner(&self) -> Ref<'_, SharedContainerInner>;
fn inner_mut(&self) -> RefMut<'_, SharedContainerInner>;
fn base_shared_container(&self) -> Ref<'_, BaseSharedValueContainer>;
fn base_shared_container_mut(&self) -> RefMut<'_, BaseSharedValueContainer>;
fn ownership(&self) -> SharedContainerOwnership;
fn observer_data(&self) -> Ref<'_, ObserverData>;
fn observer_data_mut(&self) -> RefMut<'_, ObserverData>;
fn is_uninitialized(&self) -> bool;
// Provided method
fn get_current_observers(
&self,
source_id: &TransceiverId,
) -> Vec<ObserverCallback> { ... }
}Required Methods§
Sourcefn container_mutability(&self) -> SharedContainerMutability
fn container_mutability(&self) -> SharedContainerMutability
Get the SharedContainerMutability of the container
Sourcefn value_container(&self) -> Ref<'_, ValueContainer>
fn value_container(&self) -> Ref<'_, ValueContainer>
Gets a Ref to the currently assigned ValueContainer of the shared container (not resolved recursively)
Sourcefn value_container_mut(&self) -> RefMut<'_, ValueContainer>
fn value_container_mut(&self) -> RefMut<'_, ValueContainer>
Gets a RefMut to the currently assigned ValueContainer of the shared container (not resolved recursively)
Sourcefn allowed_type(&self) -> Ref<'_, TypeDefinition>
fn allowed_type(&self) -> Ref<'_, TypeDefinition>
Gets a Ref to the currently assigned allowed TypeDefinition of the shared container (not resolved recursively)
Sourcefn is_borrowed(&self) -> bool
fn is_borrowed(&self) -> bool
Checks if the Rc in the shared container is currently borrowed mutably or immutably
Sourcefn can_mutate(&self) -> bool
fn can_mutate(&self) -> bool
Checks if the reference can be mutated by the local endpoint
fn inner(&self) -> Ref<'_, SharedContainerInner>
fn inner_mut(&self) -> RefMut<'_, SharedContainerInner>
Gets a Ref to the currently assigned BaseSharedValueContainer of the shared container (not resolved recursively)
Gets a RefMut to the currently assigned BaseSharedValueContainer of the shared container (not resolved recursively)
Sourcefn ownership(&self) -> SharedContainerOwnership
fn ownership(&self) -> SharedContainerOwnership
Returns the SharedContainerOwnership of this shared container
Sourcefn observer_data(&self) -> Ref<'_, ObserverData>
fn observer_data(&self) -> Ref<'_, ObserverData>
Returns a reference to the observer data of the shared container
Sourcefn observer_data_mut(&self) -> RefMut<'_, ObserverData>
fn observer_data_mut(&self) -> RefMut<'_, ObserverData>
Returns a mutable reference to the observer data of the shared container
Sourcefn is_uninitialized(&self) -> bool
fn is_uninitialized(&self) -> bool
Returns true if the shared container is uninitialized (i.e., it has no value assigned yet)
Provided Methods§
Sourcefn get_current_observers(
&self,
source_id: &TransceiverId,
) -> Vec<ObserverCallback>
fn get_current_observers( &self, source_id: &TransceiverId, ) -> Vec<ObserverCallback>
Returns a list of all ObserverCallbacks that are currently active for the given TransceiverId
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".