[−][src]Struct kompact::component::ComponentDefinitionAccess
Gives access to the component definition within a future/async function
This is only guaranteed to be correct when accessed as part of the future's poll
function.
In particular, under no circumstances should you ever send this anywhere else
(e.g. on a channel, or as part of spawned off closure).
The only reason this is marked as Send
is so the futures it produces can be sent
with their parent component.
This also means you may not hold references to fields within the component across await
points.
You must either drop them manually before calling await
, or simply use a sub-scope and let them go
out of scope first.
It is then safe to reacquire them following the await
.
If the future is not being used as a blocking variant,
no assumptions about the state of the component should be made after the await
point
and everthing previously established must be re-verified on the new references
if it could at all have changed between two poll
invocations.
Trait Implementations
impl<CD> Deref for ComponentDefinitionAccess<CD> where
CD: ComponentDefinition + 'static,
[src]
CD: ComponentDefinition + 'static,
impl<CD> DerefMut for ComponentDefinitionAccess<CD> where
CD: ComponentDefinition + 'static,
[src]
CD: ComponentDefinition + 'static,
impl<CD> Send for ComponentDefinitionAccess<CD> where
CD: ComponentDefinition + 'static,
[src]
CD: ComponentDefinition + 'static,
Auto Trait Implementations
impl<CD> RefUnwindSafe for ComponentDefinitionAccess<CD> where
CD: RefUnwindSafe,
CD: RefUnwindSafe,
impl<CD> !Sync for ComponentDefinitionAccess<CD>
impl<CD> Unpin for ComponentDefinitionAccess<CD>
impl<CD> UnwindSafe for ComponentDefinitionAccess<CD> where
CD: RefUnwindSafe,
CD: RefUnwindSafe,
Blanket Implementations
impl<T, A, P> Access<T> for P where
A: Access<T>,
P: Deref<Target = A>,
[src]
A: Access<T>,
P: Deref<Target = A>,
type Guard = <A as Access<T>>::Guard
A guard object containing the value and keeping it alive. Read more
pub fn load(&self) -> <P as Access<T>>::Guard
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
[src]
A: Access<T>,
<A as Access<T>>::Guard: 'static,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,