Function split_location_into_chain_part_and_beneficiary

Source
pub fn split_location_into_chain_part_and_beneficiary(
    location: Location,
) -> Option<(Location, Location)>
Expand description

Splits a combined Location into its chain part and its beneficiary part.

Junctions are popped off the tail until a chain identifier (Parachain/GlobalConsensus) is reached; whatever was popped becomes the beneficiary, relative to the chain part.

A location with no chain identifier is only valid when it has exactly one parent, in which case the chain part is the relay chain. Returns None for anything else.