pub struct LinkEncoder<'a> {
cursor: usize,
buffer: Option<&'a mut [u8]>,
context: &'a mut coap_link_encoder_ctx_t,
}
Available on
riot_module_gcoap
only.Expand description
The message buffer of a .well-known/core file in appication/link-format, as it is passed to a WithLinkEncoder handler.
Fields§
§cursor: usize
§buffer: Option<&'a mut [u8]>
§context: &'a mut coap_link_encoder_ctx_t
Implementations§
Source§impl<'a> LinkEncoder<'a>
impl<'a> LinkEncoder<'a>
fn new( buffer: Option<&'a mut [u8]>, context: &'a mut coap_link_encoder_ctx_t, ) -> Self
fn written(&self) -> usize
Sourcepub fn write_comma_maybe(&mut self)
pub fn write_comma_maybe(&mut self)
Emit a comma, except the first time this is called
(This is the separator of the records of application/link-format; RIOT’s )
Auto Trait Implementations§
impl<'a> Freeze for LinkEncoder<'a>
impl<'a> RefUnwindSafe for LinkEncoder<'a>
impl<'a> Send for LinkEncoder<'a>
impl<'a> Sync for LinkEncoder<'a>
impl<'a> Unpin for LinkEncoder<'a>
impl<'a> !UnwindSafe for LinkEncoder<'a>
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
Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes