Struct data_url::DataUrl
[−]
[src]
pub struct DataUrl<'a> { /* fields omitted */ }
Methods
impl<'a> DataUrl<'a>
[src]
fn process(input: &'a str) -> Result<Self, DataUrlError>
[src]
https://fetch.spec.whatwg.org/#data-url-processor
but starting from a string rather than a parsed Url
, to avoid extra string copies.
fn mime_type(&self) -> &Mime
[src]
fn decode<F, E>(
&self,
write_body_bytes: F
) -> Result<Option<FragmentIdentifier<'a>>, DecodeError<E>> where
F: FnMut(&[u8]) -> Result<(), E>,
[src]
&self,
write_body_bytes: F
) -> Result<Option<FragmentIdentifier<'a>>, DecodeError<E>> where
F: FnMut(&[u8]) -> Result<(), E>,
Streaming-decode the data URL’s body to write_body_bytes
,
and return the URL’s fragment identifier if it has one.
fn decode_to_vec(
&self
) -> Result<(Vec<u8>, Option<FragmentIdentifier<'a>>), InvalidBase64>
[src]
&self
) -> Result<(Vec<u8>, Option<FragmentIdentifier<'a>>), InvalidBase64>
Return the decoded body, and the URL’s fragment identifier if it has one.