Skip to main content

decided_by_log_fields

Function decided_by_log_fields 

Source
pub fn decided_by_log_fields(
    decided_by: Option<&DecidingRule>,
) -> (Option<String>, Option<usize>)
Expand description

Splits an optional DecidingRule into the (folder_id, depth) pair crate::request_log::DriveMutationOutcome::decided_by_folder_id/ decided_by_depth expect.

Shared by create/upload/edit’s otherwise near-identical record_attempt functions — each still builds its own DriveMutationOutcome (the verb-specific fields genuinely differ), but this was the one piece of extraction logic that was byte-for-byte the same in all three. Kept here (rather than in crate::request_log, which stays decoupled from any one integration’s internal types) and pure, matching this module’s zero-I/O contract — it does not itself call crate::request_log::record_drive_mutation.