Struct foxbox_taxonomy::values::Binary [] [src]

pub struct Binary {
    pub data: Arc<Vec<u8>>,
    pub mimetype: Id<MimeTypeId>,
}

Fields

data

The actual data. We put it behind an Arc to make sure that cloning remains inexpensive.

mimetype

The mime type. Should probably be an Id.

Trait Implementations

impl Deserialize for Binary

fn deserialize<__D>(deserializer: &mut __D) -> Result<Binary, __D::Error> where __D: Deserializer

impl Serialize for Binary

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

impl Parser<Binary> for Binary

fn description() -> String

fn parse(path: Path, source: &mut JSON) -> Result<Self, ParseError>

fn from_str(source: &str) -> Result<T, ParseError>

fn take(path: Path, source: &mut JSON, field_name: &str) -> Result<T, ParseError>

fn take_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<T, ParseError>>

fn take_vec_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<Vec<T>, ParseError>>

fn take_vec(path: Path, source: &mut JSON, field_name: &str) -> Result<Vec<T>, ParseError>

impl ToJSON for Binary

fn to_json(&self, parts: &mut BinaryParts) -> JSON

Derived Implementations

impl PartialEq for Binary

fn eq(&self, __arg_0: &Binary) -> bool

fn ne(&self, __arg_0: &Binary) -> bool

impl Clone for Binary

fn clone(&self) -> Binary

1.0.0fn clone_from(&mut self, source: &Self)

impl Debug for Binary

fn fmt(&self, __arg_0: &mut Formatter) -> Result