Struct TaskController

Source
pub struct TaskController {
    task_schedule: Arc<RwLock<VecDeque<Task>>>,
}
Expand description

TaskController manages and schedules tasks for MELVIN. It leverages a thread-safe task queue and powerful scheduling algorithms.

Fields§

§task_schedule: Arc<RwLock<VecDeque<Task>>>

Schedule for the next task, e.g. state switches, burn sequences, …

Implementations§

Source§

impl TaskController

Source

const MAX_ORBIT_PREDICTION_SECS: u32 = 80_000u32

The maximum number of seconds for orbit prediction calculations.

Source

const BATTERY_RESOLUTION: I32F32

The resolution for battery levels used in calculations, expressed in fixed-point format.

Source

pub const MIN_BATTERY_THRESHOLD: I32F32

The minimum batter threshold for all scheduling operations

Source

pub const MAX_BATTERY_THRESHOLD: I32F32

The maximum battery treshold for all scheduling operations

Source

const TIME_RESOLUTION: I32F32

The resolution for time duration calculations, expressed in fixed-point format.

Source

const OBJECTIVE_SCHEDULE_MIN_DT: usize = 1_000usize

The minimum delta time for scheduling objectives, in seconds.

Source

const OBJECTIVE_MIN_RETRIEVAL_TOL: usize = 100usize

The minimum tolerance for retrieving scheduled objectives.

Source

const MANEUVER_INIT_BATT_TOL: I32F32

The initial battery threshold for performing a maneuver.

Source

pub(crate) const MANEUVER_MIN_DETUMBLE_DT: usize = 20usize

The minimum delta time required for detumble maneuvers, in seconds.

Source

pub const ZO_IMAGE_FIRST_DEL: TimeDelta

The Delay for imaging objectives when the first image should be shot

Source

pub const IN_COMMS_SCHED_SECS: usize = 1_100usize

The number of seconds that are planned per acquisition cycle

Source

const COMMS_SCHED_PERIOD: usize = 800usize

The period (number of seconds) after which another comms sequence should be scheduled.

Source

const COMMS_SCHED_USABLE_TIME: TimeDelta

The usable TimeDelta between communication state switches

Source

pub const COMMS_CHARGE_USAGE: I32F32

The charge usage per strictly timed communication cycle

Source

pub const MIN_COMMS_START_CHARGE: I32F32

The minimum charge needed to enter communication state

Source

pub fn new() -> Self

Creates a new instance of the TaskController struct.

§Returns
Source

fn init_sched_dp( orbit: &ClosedOrbit, p_t_shift: usize, dt: Option<usize>, end_state: Option<FlightState>, end_batt: Option<I32F32>, ) -> OptimalOrbitResult

Initializes the optimal orbit schedule calculation.

This method sets up the required data structures and parameters necessary for determining the most efficient orbit path based on the given parameters.

§Arguments
  • orbit - Reference to the ClosedOrbit structure representing the current orbit configuration.
  • p_t_shift - The starting index used to shift and reorder the bitvector of the orbit.
  • dt - Optional maximum prediction duration in seconds. If None, defaults to the orbit period or the maximum prediction length.
  • end_status - Optional tuple containing the end flight state (FlightState) and battery level (I32F32) constraints.
§Returns
  • OptimalOrbitResult - The final result containing calculated decisions and coverage slice used in the optimization.
Source

fn calculate_optimal_orbit_schedule<'a>( pred_dt: usize, p_t_it: impl Iterator<Item = BitRef<'a>>, score_cube: LinkedBox<ScoreGrid>, score_grid_default: &ScoreGrid, dec_cube: AtomicDecisionCube, ) -> OptimalOrbitResult

Calculates the optimal orbit schedule based on predicted states and actions.

This function iterates backward over a prediction window (pred_dt) to compute the best decisions and score grid values for optimizing orbit transitions. It uses battery levels, state transitions, and the orbits done-BitBox.

§Arguments
  • pred_dt: The number of prediction time steps.
  • p_t_it: Iterator over the orbit’s completion bitvector, providing timed scores.
  • score_cube: A linked list holding previous and current score grids for dynamic programming.
  • score_grid_default: A grid initialized with default scores used during calculations.
  • dec_cube: A decision cube to store the selected actions at each time step.
§Returns
  • OptimalOrbitResult: Contains the final decision cube and the score grid linked box.
Source

fn find_last_possible_dt( i: &IndexedOrbitPosition, vel: &Vec2D<I32F32>, targets: &[(Vec2D<I32F32>, Vec2D<I32F32>)], max_dt: usize, ) -> usize

Finds the last possible time offset (dt) at which a burn can still start to reach a target.

The method simulates forward motion and calculates how long a burn can be delayed while still ensuring that MELVIN can traverse the remaining distance in time.

§Arguments
  • i: The current orbit index position.
  • vel: Current velocity vector.
  • targets: Target positions and additional target direction vector.
  • max_dt: Upper bound for time offset.
§Returns
  • dt: The latest viable starting offset in seconds.
Source

pub fn calculate_single_target_burn_sequence( curr_i: IndexedOrbitPosition, curr_vel: Vec2D<I32F32>, target_pos: Vec2D<I32F32>, target_start_time: DateTime<Utc>, target_end_time: DateTime<Utc>, fuel_left: I32F32, target_id: usize, ) -> Option<ExitBurnResult>

Calculates the optimal burn sequence to reach a single target position within a specified end time.

This function determines the most efficient sequence of orbital maneuvers (acceleration vectors) to steer the spacecraft from its current position towards a given target position, considering time and energy constraints. The resulting burn sequence minimizes fuel consumption, angle deviation, and off-orbit time while ensuring sufficient battery charge.

§Arguments
  • curr_i - The current indexed orbit position of the spacecraft.
  • f_cont_lock - A shared lock on the FlightComputer for velocity and control access.
  • target_pos - The target position as a Vec2D<I32F32>.
  • target_end_time - The deadline by which the target must be reached.
§Returns
  • (BurnSequence, I32F32) - A tuple containing:
    • The optimized BurnSequence object representing the maneuver sequence.
    • The minimum battery charge needed for the burn sequence.
§Panics

Panics if no valid burn sequence is found or the target is unreachable.

Source

pub fn calculate_multi_target_burn_sequence( curr_i: IndexedOrbitPosition, curr_vel: Vec2D<I32F32>, entries: [(Vec2D<I32F32>, Vec2D<I32F32>); 4], target_start_time: DateTime<Utc>, target_end_time: DateTime<Utc>, fuel_left: I32F32, target_id: usize, ) -> Option<ExitBurnResult>

Calculates an optimal burn sequence targeting multiple positions within a time window.

§Arguments
  • curr_i: Current indexed orbit position.
  • curr_vel: Current velocity vector.
  • entries: Array of target positions with uncertainties.
  • target_start_time: When acquisition window starts.
  • target_end_time: Deadline to acquire.
  • fuel_left: Remaining propellant budget.
  • target_id: ID of the image objective.
§Returns

Some(ExitBurnResult) on success, or None if no valid burn sequence was found.

Source

fn get_min_max_dt( start_time: DateTime<Utc>, end_time: DateTime<Utc>, curr: DateTime<Utc>, ) -> (usize, usize)

Determines the earliest and latest time offsets (in seconds) for a given target interval.

§Arguments
  • start_time: UTC time when the target becomes valid.
  • end_time: UTC time by which the target must be acquired.
  • curr: The current UTC time.
§Returns

A tuple of (min_dt, max_dt):

  • min_dt: The earliest time offset from curr to consider.
  • max_dt: The latest time offset from curr before the target deadline.
Source

async fn sched_single_comms_cycle( &self, c_end: (DateTime<Utc>, I32F32), sched_start: (DateTime<Utc>, usize), orbit: &ClosedOrbit, strict_end: (DateTime<Utc>, usize), ) -> Option<(DateTime<Utc>, I32F32)>

Schedules a single communication cycle within an orbit plan.

This function is responsible for planning a charge-acquire-comm cycle based on the given start time and constraints. It ensures sufficient battery and time are available to enter communication mode, and either schedules the cycle or short-circuits if the window is too small.

§Arguments
  • c_end: A tuple of the form (DateTime<Utc>, I32F32) representing the end time of the previous communication cycle and the remaining battery charge.
  • sched_start: A tuple (DateTime<Utc>, usize) indicating the start time and the orbit index for scheduling.
  • orbit: A reference to the ClosedOrbit used for orbit-based scheduling decisions.
  • strict_end: A tuple (DateTime<Utc>, usize) specifying the hard cutoff for scheduling.
§Returns
  • Some((DateTime<Utc>, I32F32)) with the projected end time and battery after the next comms cycle, if another cycle can be scheduled.
  • None if the scheduling window is too short and no comms cycle can be inserted.
§Notes
  • This method ensures each comms cycle starts with sufficient charge.
  • Uses COMMS_SCHED_USABLE_TIME and COMMS_CHARGE_USAGE constants to define time and battery requirements.
Source

pub async fn sched_opt_orbit_w_comms( self: Arc<TaskController>, orbit_lock: Arc<RwLock<ClosedOrbit>>, f_cont_lock: Arc<RwLock<FlightComputer>>, scheduling_start_i: IndexedOrbitPosition, last_bo_end_t: DateTime<Utc>, first_comms_end: DateTime<Utc>, end_cond: Option<EndCondition>, )

Computes and schedules tasks that balance imaging and communication passes.

This scheduling method handles alternating communication slots interleaved with optimized orbit operation schedules. It tries to maximize productivity while periodically entering comms mode.

§Arguments
  • self: Shared reference to this TaskController.
  • orbit_lock: Reference to the current orbital model.
  • f_cont_lock: Reference to the flight controller state.
  • scheduling_start_i: Position to start scheduling from.
  • last_bo_end_t: Deadline after which comms mode must stop.
  • first_comms_end: Initial estimate of when the first comms cycle ends.
  • end_cond: Optional condition that defines the final desired state and battery level.
Source

pub async fn sched_opt_orbit( self: Arc<TaskController>, orbit_lock: Arc<RwLock<ClosedOrbit>>, f_cont_lock: Arc<RwLock<FlightComputer>>, scheduling_start_i: IndexedOrbitPosition, end: Option<EndCondition>, )

Calculates and schedules the optimal orbit trajectory based on the current position and state.

§Arguments
  • self: A reference-counted TaskController used for task scheduling.
  • orbit_lock: An Arc<RwLock<ClosedOrbit>> containing the shared closed orbit data.
  • f_cont_lock: An Arc<RwLock<FlightComputer>> containing the flight control state.
  • scheduling_start_i: The starting orbital position as an IndexedOrbitPosition.
  • end: An optional EndCondition indicating the desired final status of MELVIN
Source

async fn get_batt_and_state( f_cont_lock: &Arc<RwLock<FlightComputer>>, ) -> (I32F32, usize)

Retrieves the current battery level and flight state index from the FlightComputer.

§Arguments
  • f_cont_lock: A shared reference to the flight computer’s RwLock wrapper.
§Returns
  • A tuple containing:
    • I32F32: The current battery level.
    • usize: The current flight state encoded as a decision-programming (DP) index.
Source

fn map_e_to_dp(e: I32F32) -> usize

Maps a battery level (I32F32) to a discrete DP index for scheduling purposes.

§Arguments
  • e: The current battery level to convert.
§Returns
  • usize: The index used in dynamic programming grids to represent energy.
Source

fn map_dp_to_e(dp: usize) -> I32F32

Maps a DP battery index (usize) back to a continuous I32F32 battery level.

§Arguments
  • dp: The index representing the discrete battery level.
§Returns
  • I32F32: The real-valued battery charge corresponding to the DP index.
Source

async fn sched_opt_orbit_res( &self, base_t: DateTime<Utc>, res: OptimalOrbitResult, dt_sh: usize, trunc: bool, __arg5: (I32F32, usize), ) -> (usize, I32F32)

Schedules the result of an optimal orbit calculation as tasks.

§Arguments
  • f_cont_lock: A reference-counted and thread-safe lock for accessing the flight computer state.
  • base_t: The base timestamp used for scheduling adjustments.
  • res: The result of the optimal orbit calculation, including decisions about state transitions.
  • dt_sh: The initial shift in time steps to apply during scheduling.
  • trunc: A flag indicating whether to clear the current schedule before scheduling new tasks.
§Returns
  • The total number of tasks added to the task schedule.
Source

pub fn sched_arc(&self) -> Arc<RwLock<VecDeque<Task>>>

Provides a reference to the image task schedule.

§Returns
  • An Arc pointing to the LockedTaskQueue.
Source

async fn schedule_switch(&self, target: FlightState, sched_t: DateTime<Utc>)

Schedules a task to switch the flight state at a specific time.

§Arguments
  • target: The target flight state to switch to.
  • sched_t: The scheduled time for the state change as a DateTime.
Source

async fn schedule_zo_image( &self, t: DateTime<Utc>, pos: Vec2D<I32F32>, lens: CameraAngle, )

Schedules a task to capture an image at a specific time and position using the given camera lens.

This method creates and enqueues a Task::TakeImage operation, wrapping the target position to u32 dimensions and assigning the provided lens type.

§Arguments
  • t: The scheduled time to capture the image.
  • pos: The unwrapped 2D map position of the target.
  • lens: The CameraAngle specifying which lens to use.
Source

pub async fn schedule_retrieval_phase( &self, t: DateTime<Utc>, pos: Vec2D<I32F32>, lens: CameraAngle, )

Prepares and schedules the full sequence for capturing a Zoned Objective (ZO) image.

This includes scheduling a transition from the current flight state to FlightState::Charge, then back to FlightState::Acquisition if feasible just before the first image capture, and finally scheduling the actual image task.

§Arguments
  • t: The nominal time at which the image should be taken.
  • pos: The target position on the map for the ZO image.
  • lens: The lens configuration to use for capturing the image.
Source

pub async fn schedule_vel_change( self: Arc<TaskController>, burn: BurnSequence, ) -> usize

Schedules a velocity change task for a given burn sequence.

§Arguments
  • burn: The BurnSequence containing the velocity change details.
§Returns
  • The total number of tasks in the schedule after adding the velocity change task.
Source

pub async fn clear_after_dt(&self, dt: DateTime<Utc>)

Clears tasks scheduled after a specified delay.

§Arguments
  • dt: The DateTime<Utc> representing the cutoff time for retaining tasks.
Source

async fn enqueue_task(&self, task: Task)

Adds a task to the task schedule.

§Arguments
  • task: The Task to be added to the task schedule.
Source

pub async fn clear_schedule(&self)

Clears all pending tasks in the schedule.

Trait Implementations§

Source§

impl Debug for TaskController

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T