Skip to main content

SharedContainerCommon

Trait SharedContainerCommon 

Source
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§

Source

fn container_mutability(&self) -> SharedContainerMutability

Get the SharedContainerMutability of the container

Source

fn value_container(&self) -> Ref<'_, ValueContainer>

Gets a Ref to the currently assigned ValueContainer of the shared container (not resolved recursively)

Source

fn value_container_mut(&self) -> RefMut<'_, ValueContainer>

Gets a RefMut to the currently assigned ValueContainer of the shared container (not resolved recursively)

Source

fn allowed_type(&self) -> Ref<'_, TypeDefinition>

Gets a Ref to the currently assigned allowed TypeDefinition of the shared container (not resolved recursively)

Source

fn is_borrowed(&self) -> bool

Checks if the Rc in the shared container is currently borrowed mutably or immutably

Source

fn can_mutate(&self) -> bool

Checks if the reference can be mutated by the local endpoint

Source

fn inner(&self) -> Ref<'_, SharedContainerInner>

Source

fn inner_mut(&self) -> RefMut<'_, SharedContainerInner>

Source

fn base_shared_container(&self) -> Ref<'_, BaseSharedValueContainer>

Gets a Ref to the currently assigned BaseSharedValueContainer of the shared container (not resolved recursively)

Source

fn base_shared_container_mut(&self) -> RefMut<'_, BaseSharedValueContainer>

Gets a RefMut to the currently assigned BaseSharedValueContainer of the shared container (not resolved recursively)

Source

fn ownership(&self) -> SharedContainerOwnership

Returns the SharedContainerOwnership of this shared container

Source

fn observer_data(&self) -> Ref<'_, ObserverData>

Returns a reference to the observer data of the shared container

Source

fn observer_data_mut(&self) -> RefMut<'_, ObserverData>

Returns a mutable reference to the observer data of the shared container

Source

fn is_uninitialized(&self) -> bool

Returns true if the shared container is uninitialized (i.e., it has no value assigned yet)

Provided Methods§

Source

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".

Implementors§