pub struct Data {
pub cid: ContentId,
pub max_age: Option<usize>,
pub type_: Option<String>,
pub data: Vec<u8>,
}
Expand description
Request for an uncached cid file.
Fields§
§cid: ContentId
The cid in question.
max_age: Option<usize>
How long to cache it (in seconds).
type_: Option<String>
The MIME type of the data being transmitted.
See the IANA MIME Media Types Registry for a list of registered types, but unregistered or yet-to-be-registered are accepted too.
data: Vec<u8>
The actual data.
Trait Implementations§
Source§impl AsXml for Data
impl AsXml for Data
Source§impl FromXml for Data
impl FromXml for Data
Source§fn from_events(
name: QName,
attrs: AttrMap,
ctx: &Context<'_>,
) -> Result<Self::Builder, FromEventsError>
fn from_events( name: QName, attrs: AttrMap, ctx: &Context<'_>, ) -> Result<Self::Builder, FromEventsError>
Attempt to initiate the streamed construction of this struct from XML. Read more
Source§fn xml_name_matcher() -> XmlNameMatcher<'static>
fn xml_name_matcher() -> XmlNameMatcher<'static>
Return a predicate which determines if
Self
may be parsed from
a given XML element. Read moreSource§impl TryFrom<Element> for Data
impl TryFrom<Element> for Data
Source§type Error = FromElementError
type Error = FromElementError
The type returned in the event of a conversion error.
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more