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
impl TaskController
Sourceconst MAX_ORBIT_PREDICTION_SECS: u32 = 80_000u32
const MAX_ORBIT_PREDICTION_SECS: u32 = 80_000u32
The maximum number of seconds for orbit prediction calculations.
Sourceconst BATTERY_RESOLUTION: I32F32
const BATTERY_RESOLUTION: I32F32
The resolution for battery levels used in calculations, expressed in fixed-point format.
Sourcepub const MIN_BATTERY_THRESHOLD: I32F32
pub const MIN_BATTERY_THRESHOLD: I32F32
The minimum batter threshold for all scheduling operations
Sourcepub const MAX_BATTERY_THRESHOLD: I32F32
pub const MAX_BATTERY_THRESHOLD: I32F32
The maximum battery treshold for all scheduling operations
Sourceconst TIME_RESOLUTION: I32F32
const TIME_RESOLUTION: I32F32
The resolution for time duration calculations, expressed in fixed-point format.
Sourceconst OBJECTIVE_SCHEDULE_MIN_DT: usize = 1_000usize
const OBJECTIVE_SCHEDULE_MIN_DT: usize = 1_000usize
The minimum delta time for scheduling objectives, in seconds.
Sourceconst OBJECTIVE_MIN_RETRIEVAL_TOL: usize = 100usize
const OBJECTIVE_MIN_RETRIEVAL_TOL: usize = 100usize
The minimum tolerance for retrieving scheduled objectives.
Sourceconst MANEUVER_INIT_BATT_TOL: I32F32
const MANEUVER_INIT_BATT_TOL: I32F32
The initial battery threshold for performing a maneuver.
Sourcepub(crate) const MANEUVER_MIN_DETUMBLE_DT: usize = 20usize
pub(crate) const MANEUVER_MIN_DETUMBLE_DT: usize = 20usize
The minimum delta time required for detumble maneuvers, in seconds.
Sourcepub const ZO_IMAGE_FIRST_DEL: TimeDelta
pub const ZO_IMAGE_FIRST_DEL: TimeDelta
The Delay for imaging objectives when the first image should be shot
Sourcepub const IN_COMMS_SCHED_SECS: usize = 1_100usize
pub const IN_COMMS_SCHED_SECS: usize = 1_100usize
The number of seconds that are planned per acquisition cycle
Sourceconst COMMS_SCHED_PERIOD: usize = 800usize
const COMMS_SCHED_PERIOD: usize = 800usize
The period (number of seconds) after which another comms sequence should be scheduled.
Sourceconst COMMS_SCHED_USABLE_TIME: TimeDelta
const COMMS_SCHED_USABLE_TIME: TimeDelta
The usable TimeDelta between communication state switches
Sourcepub const COMMS_CHARGE_USAGE: I32F32
pub const COMMS_CHARGE_USAGE: I32F32
The charge usage per strictly timed communication cycle
Sourcepub const MIN_COMMS_START_CHARGE: I32F32
pub const MIN_COMMS_START_CHARGE: I32F32
The minimum charge needed to enter communication state
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new instance of the TaskController struct.
§Returns
- A new
TaskControllerwith an empty task schedule.
Sourcefn init_sched_dp(
orbit: &ClosedOrbit,
p_t_shift: usize,
dt: Option<usize>,
end_state: Option<FlightState>,
end_batt: Option<I32F32>,
) -> OptimalOrbitResult
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 theClosedOrbitstructure 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. IfNone, 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.
Sourcefn 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
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.
Sourcefn find_last_possible_dt(
i: &IndexedOrbitPosition,
vel: &Vec2D<I32F32>,
targets: &[(Vec2D<I32F32>, Vec2D<I32F32>)],
max_dt: usize,
) -> usize
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.
Sourcepub 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>
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 theFlightComputerfor velocity and control access.target_pos- The target position as aVec2D<I32F32>.target_end_time- The deadline by which the target must be reached.
§Returns
(BurnSequence, I32F32)- A tuple containing:- The optimized
BurnSequenceobject representing the maneuver sequence. - The minimum battery charge needed for the burn sequence.
- The optimized
§Panics
Panics if no valid burn sequence is found or the target is unreachable.
Sourcepub 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>
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.
Sourcefn get_min_max_dt(
start_time: DateTime<Utc>,
end_time: DateTime<Utc>,
curr: DateTime<Utc>,
) -> (usize, usize)
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 fromcurrto consider.max_dt: The latest time offset fromcurrbefore the target deadline.
Sourceasync 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)>
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 theClosedOrbitused 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.Noneif 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_TIMEandCOMMS_CHARGE_USAGEconstants to define time and battery requirements.
Sourcepub 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>,
)
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 thisTaskController.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.
Sourcepub 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>,
)
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-countedTaskControllerused for task scheduling.orbit_lock: AnArc<RwLock<ClosedOrbit>>containing the shared closed orbit data.f_cont_lock: AnArc<RwLock<FlightComputer>>containing the flight control state.scheduling_start_i: The starting orbital position as anIndexedOrbitPosition.end: An optionalEndConditionindicating the desired final status of MELVIN
Sourceasync fn get_batt_and_state(
f_cont_lock: &Arc<RwLock<FlightComputer>>,
) -> (I32F32, usize)
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’sRwLockwrapper.
§Returns
- A tuple containing:
I32F32: The current battery level.usize: The current flight state encoded as a decision-programming (DP) index.
Sourcefn map_e_to_dp(e: I32F32) -> usize
fn map_e_to_dp(e: I32F32) -> usize
Sourcefn map_dp_to_e(dp: usize) -> I32F32
fn map_dp_to_e(dp: usize) -> I32F32
Sourceasync fn sched_opt_orbit_res(
&self,
base_t: DateTime<Utc>,
res: OptimalOrbitResult,
dt_sh: usize,
trunc: bool,
__arg5: (I32F32, usize),
) -> (usize, I32F32)
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.
Sourceasync fn schedule_switch(&self, target: FlightState, sched_t: DateTime<Utc>)
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 aDateTime.
Sourceasync fn schedule_zo_image(
&self,
t: DateTime<Utc>,
pos: Vec2D<I32F32>,
lens: CameraAngle,
)
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: TheCameraAnglespecifying which lens to use.
Sourcepub async fn schedule_retrieval_phase(
&self,
t: DateTime<Utc>,
pos: Vec2D<I32F32>,
lens: CameraAngle,
)
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.
Sourcepub async fn schedule_vel_change(
self: Arc<TaskController>,
burn: BurnSequence,
) -> usize
pub async fn schedule_vel_change( self: Arc<TaskController>, burn: BurnSequence, ) -> usize
Sourcepub async fn clear_after_dt(&self, dt: DateTime<Utc>)
pub async fn clear_after_dt(&self, dt: DateTime<Utc>)
Clears tasks scheduled after a specified delay.
§Arguments
dt: TheDateTime<Utc>representing the cutoff time for retaining tasks.
Sourceasync fn enqueue_task(&self, task: Task)
async fn enqueue_task(&self, task: Task)
Sourcepub async fn clear_schedule(&self)
pub async fn clear_schedule(&self)
Clears all pending tasks in the schedule.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskController
impl !RefUnwindSafe for TaskController
impl Send for TaskController
impl Sync for TaskController
impl Unpin for TaskController
impl !UnwindSafe for TaskController
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
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) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
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
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
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
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.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
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.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
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.