Enum contack::Uri [−][src]
Expand description
A struct which can either store byte information or a url
Variants
Url
Fields
url: String
A url/uri, such as http://www.example.com
Represents a classic url of any type.
Bytes
Fields
mime: String
The mimetype, ie “image/png”
Used (for ease of use) to represent binary data, will be encoded as base64, and will attempt to be decoded as such aswell.
Implementations
Converts an Uri into something which can be used by a SqlContact
This should only be used internally.
The first Option<String>
is the url, the Option<Vec<u8>>
a binary
value and the final Option<String>
is the mime.
Errors
Fails with an incomplete binary.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Uri
impl UnwindSafe for Uri
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more