pub enum ObjectData {
Content {
header: FileHeader,
size: u64,
payload: Option<Box<dyn ObjectReader>>,
},
Encoded {
encoding: Encoding,
reader: Box<dyn ObjectReader>,
},
}Expand description
The data of one object, as an ObjectSource gives it.
Variants§
Content
A content object that the session encodes.
header is the file header of the object, and size is the length of
its payload. A regular file has a payload. A symlink has no payload
and a size of 0.
For raw, the session sends the framed header and the payload. For
deflate, it sends the framed archive header, and then the payload
through its own raw-DEFLATE compressor.
Fields
§
header: FileHeaderThe file header.
§
payload: Option<Box<dyn ObjectReader>>The payload of a regular file.
Encoded
The object bytes in encoding, which the session copies as they are.
A metadata object is raw alone. The session sends a content object in
raw as raw, also if it deflates. Bytes in deflate for a metadata
object, or for a server that does not list deflate, are
Error::InvalidInput.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectData
impl !UnwindSafe for ObjectData
impl Forget for ObjectData
impl Freeze for ObjectData
impl Move for ObjectData
impl Send for ObjectData
impl Sync for ObjectData
impl Unpin for ObjectData
impl UnsafeUnpin for ObjectData
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