[][src]Struct xaynet_sdk::settings::MaxMessageSize

pub struct MaxMessageSize(_);

Represent the maximum size messages sent by a participant can have. If a larger message needs to be sent, it will be chunked and sent in several parts. Note that messages have a minimal size of MIN_MESSAGE_SIZE.

Implementations

impl MaxMessageSize[src]

pub fn unlimited() -> Self[src]

An arbitrary large maximum message size. With this setting, messages will never be split.

pub fn capped(size: usize) -> Result<Self, InvalidMaxMessageSize>[src]

Create a max message size of size.

Errors

This method returns an InvalidMaxMessageSize error if size is smaller than MIN_MESSAGE_SIZE;

pub fn max_payload_size(&self) -> Option<usize>[src]

Get the maximum payload size corresponding to the maximum message size. None means that the payload size is unlimited.

Trait Implementations

impl Clone for MaxMessageSize[src]

impl Copy for MaxMessageSize[src]

impl Debug for MaxMessageSize[src]

impl Default for MaxMessageSize[src]

impl<'de> Deserialize<'de> for MaxMessageSize[src]

impl Serialize for MaxMessageSize[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,