Struct TopicFiltersBuf
pub struct TopicFiltersBuf(Vec<u8>);Available on crate feature
alloc only.Expand description
Owned UNSUBSCRIBE payload bytes, the owned counterpart to TopicFilters.
Tuple Fields§
§0: Vec<u8>Implementations§
§impl TopicFiltersBuf
impl TopicFiltersBuf
pub const fn new() -> Self
pub const fn new() -> Self
Creates an empty buffer.
pub fn push(&mut self, filter: &TopicFilter) -> Result<(), TryReserveError>
pub fn push(&mut self, filter: &TopicFilter) -> Result<(), TryReserveError>
Appends a topic filter entry.
§Errors
Returns TryReserveError if the buffer cannot grow. The buffer is
then unchanged.
pub fn try_extend<'a, I>(&mut self, iter: I) -> Result<(), TryReserveError>where
I: IntoIterator<Item = &'a TopicFilter>,
pub fn try_extend<'a, I>(&mut self, iter: I) -> Result<(), TryReserveError>where
I: IntoIterator<Item = &'a TopicFilter>,
Appends every filter of iter.
§Errors
Returns TryReserveError if the buffer cannot grow. Filters appended
before the error remain.
pub fn try_from_iter<'a, I>(iter: I) -> Result<Self, TryReserveError>where
I: IntoIterator<Item = &'a TopicFilter>,
pub fn try_from_iter<'a, I>(iter: I) -> Result<Self, TryReserveError>where
I: IntoIterator<Item = &'a TopicFilter>,
Collects the filters of iter into a new buffer.
§Errors
Returns TryReserveError if the buffer cannot grow.
pub const fn as_topic_filters(&self) -> &TopicFilters
pub const fn as_topic_filters(&self) -> &TopicFilters
Returns a reference to the underlying TopicFilters.
Methods from Deref<Target = TopicFilters>§
Trait Implementations§
§impl AsRef<TopicFilters> for TopicFiltersBuf
impl AsRef<TopicFilters> for TopicFiltersBuf
§fn as_ref(&self) -> &TopicFilters
fn as_ref(&self) -> &TopicFilters
Converts this type into a shared reference of the (usually inferred) input type.
§impl Borrow<TopicFilters> for TopicFiltersBuf
impl Borrow<TopicFilters> for TopicFiltersBuf
§fn borrow(&self) -> &TopicFilters
fn borrow(&self) -> &TopicFilters
Immutably borrows from an owned value. Read more
§impl Clone for TopicFiltersBuf
impl Clone for TopicFiltersBuf
§fn clone(&self) -> TopicFiltersBuf
fn clone(&self) -> TopicFiltersBuf
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TopicFiltersBuf
impl Debug for TopicFiltersBuf
§impl Default for TopicFiltersBuf
impl Default for TopicFiltersBuf
§impl Deref for TopicFiltersBuf
impl Deref for TopicFiltersBuf
§type Target = TopicFilters
type Target = TopicFilters
The resulting type after dereferencing.
§fn deref(&self) -> &TopicFilters
fn deref(&self) -> &TopicFilters
Dereferences the value.
impl Eq for TopicFiltersBuf
§impl Hash for TopicFiltersBuf
impl Hash for TopicFiltersBuf
§impl PartialEq for TopicFiltersBuf
impl PartialEq for TopicFiltersBuf
impl StructuralPartialEq for TopicFiltersBuf
Auto Trait Implementations§
impl Freeze for TopicFiltersBuf
impl RefUnwindSafe for TopicFiltersBuf
impl Send for TopicFiltersBuf
impl Sync for TopicFiltersBuf
impl Unpin for TopicFiltersBuf
impl UnsafeUnpin for TopicFiltersBuf
impl UnwindSafe for TopicFiltersBuf
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