Struct ffsend_api::action::params::ParamsData [−][src]
pub struct ParamsData { /* fields omitted */ }The parameters data object, that is sent to the server.
Methods
impl ParamsData[src]
impl ParamsDatapub fn new() -> Self[src]
pub fn new() -> SelfConstruct a new parameters object, that is empty.
pub fn from(download_limit: Option<u8>) -> Self[src]
pub fn from(download_limit: Option<u8>) -> SelfCreate a new parameters data object, with the given parameters.
pub fn set_download_limit(
&mut self,
download_limit: Option<u8>
) -> Result<(), ParamsDataError>[src]
pub fn set_download_limit(
&mut self,
download_limit: Option<u8>
) -> Result<(), ParamsDataError>Set the maximum number of allowed downloads, after which the file will be removed.
None may be given, to keep this parameter as is.
An error may be returned if the download value is out of the allowed
bound. These bounds are fixed and enforced by the server.
See PARAMS_DOWNLOAD_MIN and PARAMS_DOWNLOAD_MAX.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolCheck whether this parameters object is empty, and wouldn't change any parameter on the server when sent. Sending an empty parameter data object would thus be useless.
Trait Implementations
impl Clone for ParamsData[src]
impl Clone for ParamsDatafn clone(&self) -> ParamsData[src]
fn clone(&self) -> ParamsDataReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for ParamsData[src]
impl Debug for ParamsDatafn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for ParamsData[src]
impl Default for ParamsDatafn default() -> ParamsData[src]
fn default() -> ParamsDataReturns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for ParamsData
impl Send for ParamsDataimpl Sync for ParamsData
impl Sync for ParamsData