hoomd_microstate/boundary/
open.rs1use arrayvec::ArrayVec;
7use serde::{Deserialize, Serialize};
8
9use super::{Error, GenerateGhosts, MAX_GHOSTS, Wrap};
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Open;
17
18impl<P> Wrap<P> for Open {
19 #[inline]
20 fn wrap(&self, properties: P) -> Result<P, Error> {
21 Ok(properties)
22 }
23}
24
25impl<S> GenerateGhosts<S> for Open
26where
27 S: Default,
28{
29 #[inline]
30 fn maximum_interaction_range(&self) -> f64 {
31 f64::INFINITY
32 }
33
34 #[inline]
35 fn generate_ghosts(&self, _site_properties: &S) -> ArrayVec<S, MAX_GHOSTS> {
36 ArrayVec::new()
37 }
38}