pub struct TransportInfo {
pub playing: bool,
pub recording: bool,
pub tempo: f64,
pub time_sig_num: u8,
pub time_sig_den: u8,
pub position_samples: i64,
pub position_seconds: f64,
pub position_beats: f64,
pub bar_start_beats: f64,
pub loop_active: bool,
pub loop_start_beats: f64,
pub loop_end_beats: f64,
}Expand description
Host-populated transport snapshot. Constructed by every format
wrapper from the host’s own transport struct via struct-literal
expressions, so this stays “exhaustive” (no #[non_exhaustive],
which would block cross-crate construction). Adding a new field
is a coordinated workspace-wide change.
Fields§
§playing: bool§recording: bool§tempo: f64§time_sig_num: u8§time_sig_den: u8§position_samples: i64§position_seconds: f64§position_beats: f64§bar_start_beats: f64§loop_active: bool§loop_start_beats: f64§loop_end_beats: f64Implementations§
Source§impl TransportInfo
impl TransportInfo
Sourcepub fn for_screenshot() -> TransportInfo
pub fn for_screenshot() -> TransportInfo
Synthetic transport for snapshot tests - playing at 120 BPM,
4/4, position 4.0 beats. Used as the default by every snapshot
helper (truce-egui, truce-slint, truce-iced,
truce-test) so that transport-aware widgets render a
populated readout in marketing screenshots instead of a
(no host transport) placeholder.
Trait Implementations§
Source§impl Clone for TransportInfo
impl Clone for TransportInfo
Source§fn clone(&self) -> TransportInfo
fn clone(&self) -> TransportInfo
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 Debug for TransportInfo
impl Debug for TransportInfo
Source§impl Default for TransportInfo
impl Default for TransportInfo
Source§fn default() -> TransportInfo
fn default() -> TransportInfo
Returns the “default value” for a type. Read more
impl Copy for TransportInfo
Auto Trait Implementations§
impl Freeze for TransportInfo
impl RefUnwindSafe for TransportInfo
impl Send for TransportInfo
impl Sync for TransportInfo
impl Unpin for TransportInfo
impl UnsafeUnpin for TransportInfo
impl UnwindSafe for TransportInfo
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