asSymbol

fun asSymbol(): BsonSymbol

Gets this value as a BsonSymbol if it is one, otherwise throws exception

Return

an BsonSymbol

Throws

if this value is not of the expected type