pub struct Limiter<T>where
T: SimObject,{
pub entity: Rc<Entity>,
/* private fields */
}Expand description
The Limiter is a component that will allow data through at a
specified rate.
The rate is defined in bits-per-second.
Fields§
§entity: Rc<Entity>Implementations§
Source§impl<T> Limiter<T>where
T: SimObject,
impl<T> Limiter<T>where
T: SimObject,
pub fn new_and_register( engine: &Engine, parent: &Rc<Entity>, name: &str, limiter: Rc<RateLimiter<T>>, ) -> Result<Rc<Self>, SimError>
pub fn connect_port_tx(&self, port_state: PortStateResult<T>) -> SimResult
pub fn port_rx(&self) -> PortStateResult<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Limiter<T>
impl<T> !RefUnwindSafe for Limiter<T>
impl<T> !Send for Limiter<T>
impl<T> !Sync for Limiter<T>
impl<T> Unpin for Limiter<T>
impl<T> !UnwindSafe for Limiter<T>
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