Instance Methodswift-bson 0.3.1BSONABI
expect(multipleOf:)
Returns the quotient if the number of elements in the relevant collection is a multiple of the specified stride, or throws a ShapeError
otherwise. If the stride is zero, this method also throws a ShapeError
, unless the length is zero as well.
func expect(multipleOf stride: Int) throws -> Int