pub struct FileHeaders {
pub name: Option<String>,
pub tag_uid: Option<u32>,
pub content_type: Option<String>,
}Expand description
Parsed file-download response headers. Mirrors bee-go
FileHeaders.
Fields§
§name: Option<String>Filename extracted from Content-Disposition.
tag_uid: Option<u32>Tag UID from Swarm-Tag-Uid.
content_type: Option<String>Content-Type value.
Implementations§
Source§impl FileHeaders
impl FileHeaders
Sourcepub fn from_response(headers: &HeaderMap) -> Self
pub fn from_response(headers: &HeaderMap) -> Self
Extract the file metadata Bee places on download responses. Missing or malformed headers fall through silently.
Trait Implementations§
Source§impl Clone for FileHeaders
impl Clone for FileHeaders
Source§fn clone(&self) -> FileHeaders
fn clone(&self) -> FileHeaders
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileHeaders
impl Debug for FileHeaders
Source§impl Default for FileHeaders
impl Default for FileHeaders
Source§fn default() -> FileHeaders
fn default() -> FileHeaders
Returns the “default value” for a type. Read more
Source§impl PartialEq for FileHeaders
impl PartialEq for FileHeaders
impl Eq for FileHeaders
impl StructuralPartialEq for FileHeaders
Auto Trait Implementations§
impl Freeze for FileHeaders
impl RefUnwindSafe for FileHeaders
impl Send for FileHeaders
impl Sync for FileHeaders
impl Unpin for FileHeaders
impl UnsafeUnpin for FileHeaders
impl UnwindSafe for FileHeaders
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