pub struct Pantograph { /* private fields */ }Expand description
Handle auf einen Stromabnehmer am aktuellen Fahrzeug.
Handle to a pantograph on the current vehicle.
Implementations§
Source§impl Pantograph
impl Pantograph
Sourcepub fn get(index: usize) -> Result<Pantograph, VehicleError>
pub fn get(index: usize) -> Result<Pantograph, VehicleError>
Gibt den Stromabnehmer am angegebenen nullbasierten Index zurück.
Returns the pantograph at the given zero-based index.
Sourcepub fn height(self) -> f32
pub fn height(self) -> f32
Gibt die Höhe des tiefsten Fahrdrads über der Stromabnehmer-Position zurück.
Returns the height of the lowest contact wire above the pantograph position.
Sourcepub fn voltage(self) -> f32
pub fn voltage(self) -> f32
Spannung der Fahrleitung über dem Stromabnehmer (normalisiert; 1.0 = Sollspannung). Das Script muss selbst prüfen, ob der Stromabnehmer die Leitung berührt.
The voltage of the contact wire above the pantograph. The value is normalized, i.e. 1.0 means that the target voltage is present. However, the script itself must check whether the pantograph is touching the contact wire.
Trait Implementations§
Source§impl Clone for Pantograph
impl Clone for Pantograph
Source§fn clone(&self) -> Pantograph
fn clone(&self) -> Pantograph
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 moreimpl Copy for Pantograph
Source§impl Debug for Pantograph
impl Debug for Pantograph
impl Eq for Pantograph
Source§impl Hash for Pantograph
impl Hash for Pantograph
Source§impl PartialEq for Pantograph
impl PartialEq for Pantograph
impl StructuralPartialEq for Pantograph
Auto Trait Implementations§
impl Freeze for Pantograph
impl RefUnwindSafe for Pantograph
impl Send for Pantograph
impl Sync for Pantograph
impl Unpin for Pantograph
impl UnsafeUnpin for Pantograph
impl UnwindSafe for Pantograph
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