pub struct GearTrain<'a, E: Copy + Debug> { /* private fields */ }Expand description
Implementations§
Source§impl<'a, E: Copy + Debug> GearTrain<'a, E>
impl<'a, E: Copy + Debug> GearTrain<'a, E>
Sourcepub const fn with_ratio_raw(ratio: f32) -> Self
pub const fn with_ratio_raw(ratio: f32) -> Self
Construct a GearTrain with the ratio as an f32.
Sourcepub const fn with_ratio(ratio: Quantity) -> Self
pub const fn with_ratio(ratio: Quantity) -> Self
Sourcepub const fn new<const N: usize>(teeth: [f32; N]) -> Self
pub const fn new<const N: usize>(teeth: [f32; N]) -> Self
Construct a GearTrain from an array of the numbers of teeth on each gear in the train.
Sourcepub fn get_terminal_1(&self) -> &'a RefCell<Terminal<'a, E>>
pub fn get_terminal_1(&self) -> &'a RefCell<Terminal<'a, E>>
Get a reference to the side 1 terminal of the device where (side 1) * ratio = (side 2).
Sourcepub fn get_terminal_2(&self) -> &'a RefCell<Terminal<'a, E>>
pub fn get_terminal_2(&self) -> &'a RefCell<Terminal<'a, E>>
Get a reference to the side 2 terminal of the device where (side 1) * ratio = (side 2).
Trait Implementations§
Auto Trait Implementations§
impl<'a, E> !Freeze for GearTrain<'a, E>
impl<'a, E> !RefUnwindSafe for GearTrain<'a, E>
impl<'a, E> !Send for GearTrain<'a, E>
impl<'a, E> !Sync for GearTrain<'a, E>
impl<'a, E> Unpin for GearTrain<'a, E>
impl<'a, E> UnsafeUnpin for GearTrain<'a, E>
impl<'a, E> !UnwindSafe for GearTrain<'a, E>
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