pub struct CuSceneExclusions<const MAX_EXCLUSIONS: usize = DEFAULT_MAX_EXCLUSIONS> { /* private fields */ }Expand description
Fixed-capacity stable-ID exclusion set (CuMsgPayload-compliant).
Published alongside a CuPlanningScene snapshot and validated against it on every check,
so exclusions always bind to the current snapshot.
Implementations§
Source§impl<const MAX_EXCLUSIONS: usize> CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> CuSceneExclusions<MAX_EXCLUSIONS>
Sourcepub fn as_slice(&self) -> &[CuSceneExclusion]
pub fn as_slice(&self) -> &[CuSceneExclusion]
Borrows the active exclusions.
Sourcepub fn add(&mut self, exclusion: CuSceneExclusion) -> CuResult<()>
pub fn add(&mut self, exclusion: CuSceneExclusion) -> CuResult<()>
Appends an exclusion if capacity permits.
Sourcepub fn validate<const MAX_OBS: usize, const MAX_ATT: usize>(
&self,
scene: &CuPlanningScene<MAX_OBS, MAX_ATT>,
robot_shape_count: usize,
) -> CuResult<()>
pub fn validate<const MAX_OBS: usize, const MAX_ATT: usize>( &self, scene: &CuPlanningScene<MAX_OBS, MAX_ATT>, robot_shape_count: usize, ) -> CuResult<()>
Checks every entry against scene and a robot model with robot_shape_count shapes.
Unassigned or unknown IDs, self-references, and out-of-range robot shape indices fail. Checks perform the same validation; this lets a caller reject a snapshot up front.
Trait Implementations§
Source§impl<'de, C, const MAX_EXCLUSIONS: usize> BorrowDecode<'de, C> for CuSceneExclusions<MAX_EXCLUSIONS>
impl<'de, C, const MAX_EXCLUSIONS: usize> BorrowDecode<'de, C> for CuSceneExclusions<MAX_EXCLUSIONS>
Source§fn borrow_decode<D: BorrowDecoder<'de, Context = C>>(
decoder: &mut D,
) -> Result<Self, DecodeError>
fn borrow_decode<D: BorrowDecoder<'de, Context = C>>( decoder: &mut D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<const MAX_EXCLUSIONS: usize> Clone for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Clone for CuSceneExclusions<MAX_EXCLUSIONS>
Source§fn clone(&self) -> CuSceneExclusions<MAX_EXCLUSIONS>
fn clone(&self) -> CuSceneExclusions<MAX_EXCLUSIONS>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const MAX_EXCLUSIONS: usize> Debug for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Debug for CuSceneExclusions<MAX_EXCLUSIONS>
Source§impl<C, const MAX_EXCLUSIONS: usize> Decode<C> for CuSceneExclusions<MAX_EXCLUSIONS>
impl<C, const MAX_EXCLUSIONS: usize> Decode<C> for CuSceneExclusions<MAX_EXCLUSIONS>
Source§impl<const MAX_EXCLUSIONS: usize> Default for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Default for CuSceneExclusions<MAX_EXCLUSIONS>
Source§impl<'de, const MAX_EXCLUSIONS: usize> Deserialize<'de> for CuSceneExclusions<MAX_EXCLUSIONS>
impl<'de, const MAX_EXCLUSIONS: usize> Deserialize<'de> for CuSceneExclusions<MAX_EXCLUSIONS>
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const MAX_EXCLUSIONS: usize> Encode for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Encode for CuSceneExclusions<MAX_EXCLUSIONS>
Source§impl<const MAX_EXCLUSIONS: usize> PartialEq for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> PartialEq for CuSceneExclusions<MAX_EXCLUSIONS>
Source§impl<const MAX_EXCLUSIONS: usize> Serialize for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Serialize for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> StructuralPartialEq for CuSceneExclusions<MAX_EXCLUSIONS>
Source§impl<const MAX_EXCLUSIONS: usize> TypePath for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> TypePath for CuSceneExclusions<MAX_EXCLUSIONS>
fn type_path() -> &'static str
fn short_type_path() -> &'static str
fn type_ident() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
fn module_path() -> Option<&'static str>
Auto Trait Implementations§
impl<const MAX_EXCLUSIONS: usize> Freeze for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> RefUnwindSafe for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Send for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Sync for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> Unpin for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> UnsafeUnpin for CuSceneExclusions<MAX_EXCLUSIONS>
impl<const MAX_EXCLUSIONS: usize> UnwindSafe for CuSceneExclusions<MAX_EXCLUSIONS>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CuMsgPayload for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> GetTypeRegistration for T
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> ⓘ
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