pub struct CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,{ /* private fields */ }Expand description
Placeholder bridge used in simulation when a bridge is configured with
run_in_sim: false.
This bridge is parameterized directly by the Tx/Rx channel sets generated from configuration, so the original bridge type does not need to compile in simulation mode.
Trait Implementations§
Source§impl<Tx, Rx> CuBridge for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
impl<Tx, Rx> CuBridge for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
Source§fn new(
_config: Option<&ComponentConfig>,
_tx_channels: &[BridgeChannelConfig<<<CuSimBridge<Tx, Rx> as CuBridge>::Tx as BridgeChannelSet>::Id>],
_rx_channels: &[BridgeChannelConfig<<<CuSimBridge<Tx, Rx> as CuBridge>::Rx as BridgeChannelSet>::Id>],
_resources: <CuSimBridge<Tx, Rx> as CuBridge>::Resources<'_>,
) -> Result<CuSimBridge<Tx, Rx>, CuError>where
CuSimBridge<Tx, Rx>: Sized,
fn new(
_config: Option<&ComponentConfig>,
_tx_channels: &[BridgeChannelConfig<<<CuSimBridge<Tx, Rx> as CuBridge>::Tx as BridgeChannelSet>::Id>],
_rx_channels: &[BridgeChannelConfig<<<CuSimBridge<Tx, Rx> as CuBridge>::Rx as BridgeChannelSet>::Id>],
_resources: <CuSimBridge<Tx, Rx> as CuBridge>::Resources<'_>,
) -> Result<CuSimBridge<Tx, Rx>, CuError>where
CuSimBridge<Tx, Rx>: Sized,
Constructs a new bridge. Read more
Source§fn send<'a, Payload>(
&mut self,
_ctx: &CuContext,
_channel: &'static BridgeChannel<<<CuSimBridge<Tx, Rx> as CuBridge>::Tx as BridgeChannelSet>::Id, Payload>,
_msg: &CuStampedData<Payload, CuMsgMetadata>,
) -> Result<(), CuError>where
Payload: CuMsgPayload + 'a,
fn send<'a, Payload>(
&mut self,
_ctx: &CuContext,
_channel: &'static BridgeChannel<<<CuSimBridge<Tx, Rx> as CuBridge>::Tx as BridgeChannelSet>::Id, Payload>,
_msg: &CuStampedData<Payload, CuMsgMetadata>,
) -> Result<(), CuError>where
Payload: CuMsgPayload + 'a,
Sends a message on the selected outbound channel.
Source§fn receive<'a, Payload>(
&mut self,
_ctx: &CuContext,
_channel: &'static BridgeChannel<<<CuSimBridge<Tx, Rx> as CuBridge>::Rx as BridgeChannelSet>::Id, Payload>,
_msg: &mut CuStampedData<Payload, CuMsgMetadata>,
) -> Result<(), CuError>where
Payload: CuMsgPayload + 'a,
fn receive<'a, Payload>(
&mut self,
_ctx: &CuContext,
_channel: &'static BridgeChannel<<<CuSimBridge<Tx, Rx> as CuBridge>::Rx as BridgeChannelSet>::Id, Payload>,
_msg: &mut CuStampedData<Payload, CuMsgMetadata>,
) -> Result<(), CuError>where
Payload: CuMsgPayload + 'a,
Receives a message from the selected inbound channel. Read more
Source§fn start(&mut self, _ctx: &CuContext) -> Result<(), CuError>
fn start(&mut self, _ctx: &CuContext) -> Result<(), CuError>
Called before the first send/receive cycle.
Source§fn preprocess(&mut self, _ctx: &CuContext) -> Result<(), CuError>
fn preprocess(&mut self, _ctx: &CuContext) -> Result<(), CuError>
Gives the bridge a chance to prepare buffers before I/O.
Source§impl<Tx, Rx> Freezable for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
impl<Tx, Rx> Freezable for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
Source§fn freeze<E>(&self, encoder: &mut E) -> Result<(), EncodeError>where
E: Encoder,
fn freeze<E>(&self, encoder: &mut E) -> Result<(), EncodeError>where
E: Encoder,
This method is called by the framework when it wants to save the task state.
The default implementation is to encode nothing (stateless).
If you have a state, you need to implement this method.
Source§fn thaw<D>(&mut self, _decoder: &mut D) -> Result<(), DecodeError>where
D: Decoder,
fn thaw<D>(&mut self, _decoder: &mut D) -> Result<(), DecodeError>where
D: Decoder,
This method is called by the framework when it wants to restore the task to a specific state.
Here it is similar to Decode but the framework will give you a new instance of the task (the new method will be called)
Source§impl<Tx, Rx> GetTypeRegistration for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
impl<Tx, Rx> GetTypeRegistration for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
Returns the default
TypeRegistration for this type.Source§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
Registers other types needed by this type. Read more
Source§impl<Tx, Rx> PartialReflect for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
impl<Tx, Rx> PartialReflect for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn try_apply(
&mut self,
value: &(dyn PartialReflect + 'static),
) -> Result<(), ApplyError>
fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Returns a zero-sized enumeration of “kinds” of type. Read more
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Returns an immutable enumeration of “kinds” of type. Read more
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Returns a mutable enumeration of “kinds” of type. Read more
Source§fn reflect_owned(self: Box<CuSimBridge<Tx, Rx>>) -> ReflectOwned
fn reflect_owned(self: Box<CuSimBridge<Tx, Rx>>) -> ReflectOwned
Returns an owned enumeration of “kinds” of type. Read more
Source§fn try_into_reflect(
self: Box<CuSimBridge<Tx, Rx>>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<CuSimBridge<Tx, Rx>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Attempts to cast this type to a boxed, fully-reflected value.
Source§fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
Attempts to cast this type to a fully-reflected value.
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
Attempts to cast this type to a mutable, fully-reflected value.
Source§fn into_partial_reflect(
self: Box<CuSimBridge<Tx, Rx>>,
) -> Box<dyn PartialReflect>
fn into_partial_reflect( self: Box<CuSimBridge<Tx, Rx>>, ) -> Box<dyn PartialReflect>
Casts this type to a boxed, reflected value. Read more
Source§fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
Casts this type to a reflected value. Read more
Source§fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
Casts this type to a mutable, reflected value. Read more
Source§fn reflect_partial_eq(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Returns a “partial equality” comparison result. Read more
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Attempts to clone
Self using reflection. Read more§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Applies a reflected value to this value. Read more
§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
§fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
For a type implementing
PartialReflect, combines reflect_clone and
take in a useful fashion, automatically constructing an appropriate
ReflectCloneError if the downcast fails. Read more§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Returns a hash of the value (which includes the type). Read more
§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Debug formatter for the value. Read more
§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Indicates whether or not this type is a dynamic type. Read more
Source§impl<Tx, Rx> Reflect for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
impl<Tx, Rx> Reflect for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
Source§fn into_any(self: Box<CuSimBridge<Tx, Rx>>) -> Box<dyn Any>
fn into_any(self: Box<CuSimBridge<Tx, Rx>>) -> Box<dyn Any>
Returns the value as a
Box<dyn Any>. Read moreSource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Returns the value as a
&mut dyn Any. Read moreSource§fn into_reflect(self: Box<CuSimBridge<Tx, Rx>>) -> Box<dyn Reflect>
fn into_reflect(self: Box<CuSimBridge<Tx, Rx>>) -> Box<dyn Reflect>
Casts this type to a boxed, fully-reflected value.
Source§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
Casts this type to a fully-reflected value.
Source§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
Casts this type to a mutable, fully-reflected value.
Source§impl<Tx, Rx> Struct for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
impl<Tx, Rx> Struct for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
Source§fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
Returns a reference to the value of the field named
name as a &dyn PartialReflect.Source§fn field_mut(
&mut self,
name: &str,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_mut( &mut self, name: &str, ) -> Option<&mut (dyn PartialReflect + 'static)>
Returns a mutable reference to the value of the field named
name as a
&mut dyn PartialReflect.Source§fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
Returns a reference to the value of the field with index
index as a
&dyn PartialReflect.Source§fn field_at_mut(
&mut self,
index: usize,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_at_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>
Returns a mutable reference to the value of the field with index
index
as a &mut dyn PartialReflect.Source§fn name_at(&self, index: usize) -> Option<&str>
fn name_at(&self, index: usize) -> Option<&str>
Returns the name of the field with index
index.Source§fn iter_fields(&self) -> FieldIter<'_> ⓘ
fn iter_fields(&self) -> FieldIter<'_> ⓘ
Returns an iterator over the values of the reflectable fields for this struct.
Source§fn to_dynamic_struct(&self) -> DynamicStruct
fn to_dynamic_struct(&self) -> DynamicStruct
Creates a new
DynamicStruct from this struct.§fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
Will return
None if TypeInfo is not available.Source§impl<Tx, Rx> TypePath for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
impl<Tx, Rx> TypePath for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Returns the fully qualified path of the underlying type. Read more
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Returns a short, pretty-print enabled path to the type. Read more
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Source§impl<Tx, Rx> Typed for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
impl<Tx, Rx> Typed for CuSimBridge<Tx, Rx>where
Tx: BridgeChannelSet + 'static,
Rx: BridgeChannelSet + 'static,
CuSimBridge<Tx, Rx>: Any + Send + Sync,
Auto Trait Implementations§
impl<Tx, Rx> Freeze for CuSimBridge<Tx, Rx>
impl<Tx, Rx> RefUnwindSafe for CuSimBridge<Tx, Rx>
impl<Tx, Rx> Send for CuSimBridge<Tx, Rx>
impl<Tx, Rx> Sync for CuSimBridge<Tx, Rx>
impl<Tx, Rx> Unpin for CuSimBridge<Tx, Rx>
impl<Tx, Rx> UnsafeUnpin for CuSimBridge<Tx, Rx>
impl<Tx, Rx> UnwindSafe for CuSimBridge<Tx, Rx>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
See
TypePath::type_path.§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
See
TypePath::type_ident.§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
See
TypePath::crate_name.§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
See
Typed::type_info.§impl<T> GetPath for T
impl<T> GetPath for T
§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
Returns a reference to the value specified by
path. Read more§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
Returns a mutable reference to the value specified by
path. Read more§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
Returns a statically typed reference to the value specified by
path. Read more§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
Returns a statically typed mutable reference to the value specified by
path. Read moreSource§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>
Converts
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>
Converts
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 more