We present a concept called the branch-depth of a connectivity function, that generalizes the tree-depth of graphs. Then we prove two theorems showing that this concept aligns closely with the notions of tree-depth and shrub-depth of graphs as follows. For a graph G = (V, E) and a subset A of E we let lambda(G)(A) be the number of vertices incident with an edge in A and an edge in E \ A. For a subset X of V, let rho(G)(X) be the rank of the adjacency matrix between X and V \ X over the binary field. We prove that a class of graphs has bounded tree-depth if and only if the corresponding class of functions lambda(G) has bounded branch depth and similarly a class of graphs has bounded shrub-depth if and only if the corresponding class of functions rho(G) has bounded branch-depth, which we call the rank-depth of graphs. Furthermore we investigate various potential generalizations of tree-depth to matroids and prove that matroids representable over a fixed finite field having no large circuits are well-quasi ordered by restriction.