[][src]Struct ffsend_api::action::params::ParamsData

pub struct ParamsData { /* fields omitted */ }

The parameters data object, that is sent to the server.

Methods

impl ParamsData[src]

pub fn new() -> Self[src]

Construct a new parameters object, that is empty.

pub fn from(download_limit: Option<u8>) -> Self[src]

Create a new parameters data object, with the given parameters.

pub fn set_download_limit(
    &mut self,
    download_limit: Option<u8>
) -> Result<(), ParamsDataError>
[src]

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]

Check 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]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for ParamsData[src]

impl Debug for ParamsData[src]

impl Serialize for ParamsData[src]

Auto Trait Implementations

impl Send for ParamsData

impl Sync for ParamsData

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

default fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> Same for T

type Output = T

Should always be Self