Struct bson2::Binary [−][src]
pub struct Binary {
pub subtype: BinarySubtype,
pub bytes: Vec<u8>,
}
Expand description
Represents a BSON binary value.
Fields
subtype: BinarySubtype
The subtype of the bytes.
bytes: Vec<u8>
The binary bytes.
Implementations
Serializes a Uuid
into BSON binary type and takes the desired representation as a
parameter. Binary::from_uuid_with_representation(uuid, UuidRepresentation::Standard)
is
equivalent to Binary::from_uuid(uuid)
.
See the documentation for UuidRepresentation
for more information on the possible
representations.
Deserializes a BSON Binary
type into a Uuid
according to the provided
representation. If the representation does not match the Binary
, an error will be
returned.
See the documentation for UuidRepresentation
for more information on the possible
representations.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Binary
impl UnwindSafe for Binary
Blanket Implementations
Mutably borrows from an owned value. Read more