pub struct UploadState {
pub upload_id: String,
pub offset: u64,
pub chunk_size: usize,
}Expand description
Reply describing a session’s current state.
Fields§
§upload_id: String§offset: u64Next byte the server expects.
chunk_size: usizeLargest chunk the caller may send.
Advertised rather than assumed: the ceiling depends on how this device
is reachable, and a client that guesses will guess wrong on one of
them. A relay-joined device advertises fs::RELAY_CHUNK_SIZE, which
fits the relay’s fixed request deadline; otherwise
fs::DEFAULT_CHUNK_SIZE. --fs-chunk-size overrides both.
This is a property of the device, not of the request. An earlier
version of this comment said the ceiling “depends on the path the
request travelled”, which was never true and could not have been: the
relay injects no marker and replays the caller’s headers verbatim
(relay::client::serve_one), so a handler cannot tell a relayed
request from a direct one. The value is chosen once, at startup, from
whether --relay was given — which means a direct caller on a
relay-joined device is told the smaller number too. Say what it does.
Trait Implementations§
Source§impl Debug for UploadState
impl Debug for UploadState
Auto Trait Implementations§
impl Freeze for UploadState
impl RefUnwindSafe for UploadState
impl Send for UploadState
impl Sync for UploadState
impl Unpin for UploadState
impl UnsafeUnpin for UploadState
impl UnwindSafe for UploadState
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.