Struct xmpp_parsers::pubsub::pubsub::PublishOptions
source · pub struct PublishOptions {
pub form: Option<DataForm>,
}
Expand description
The options associated to a publish request.
Fields§
§form: Option<DataForm>
The form describing these options.
Implementations§
source§impl PublishOptions
impl PublishOptions
sourcepub fn new(
persist_items: bool,
max_items: Option<usize>,
send_last_published_item: SendLastPublished,
access_model: AccessModel
) -> Self
pub fn new( persist_items: bool, max_items: Option<usize>, send_last_published_item: SendLastPublished, access_model: AccessModel ) -> Self
Create a new PublishOptions, containing a submission of publish-options form.
Arguments:
persist_items
: Whether to persist the items even if no subscribers are present.max_items
: How many items to keep. (None for no specific limit; “max”)send_last_published_item
: Whether to send the last-published item when subscribing.access_model
: The access model to use.
Trait Implementations§
source§impl Clone for PublishOptions
impl Clone for PublishOptions
source§fn clone(&self) -> PublishOptions
fn clone(&self) -> PublishOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PublishOptions
impl Debug for PublishOptions
source§impl From<PublishOptions> for Element
impl From<PublishOptions> for Element
source§fn from(elem: PublishOptions) -> Element
fn from(elem: PublishOptions) -> Element
Converts to this type from the input type.
source§impl PartialEq for PublishOptions
impl PartialEq for PublishOptions
source§fn eq(&self, other: &PublishOptions) -> bool
fn eq(&self, other: &PublishOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<Element> for PublishOptions
impl TryFrom<Element> for PublishOptions
impl StructuralPartialEq for PublishOptions
Auto Trait Implementations§
impl RefUnwindSafe for PublishOptions
impl Send for PublishOptions
impl Sync for PublishOptions
impl Unpin for PublishOptions
impl UnwindSafe for PublishOptions
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