Lengths of a curve and corresponding Hausdorff-type dimensions on generalized metric spaces