Struct coset::HeaderBuilder
source · pub struct HeaderBuilder(/* private fields */);
Expand description
Builder for Header
objects.
Implementations§
source§impl HeaderBuilder
impl HeaderBuilder
sourcepub fn add_critical(self, param: HeaderParameter) -> Self
pub fn add_critical(self, param: HeaderParameter) -> Self
Add a critical header.
sourcepub fn add_critical_label(self, label: RegisteredLabel<HeaderParameter>) -> Self
pub fn add_critical_label(self, label: RegisteredLabel<HeaderParameter>) -> Self
Add a critical header.
sourcepub fn content_format(self, content_type: CoapContentFormat) -> Self
pub fn content_format(self, content_type: CoapContentFormat) -> Self
Set the content type to a numeric value.
sourcepub fn content_type(self, content_type: String) -> Self
pub fn content_type(self, content_type: String) -> Self
Set the content type to a text value.
sourcepub fn partial_iv(self, iv: Vec<u8>) -> Self
pub fn partial_iv(self, iv: Vec<u8>) -> Self
Set the partial IV, and clear any IV already set.
sourcepub fn add_counter_signature(self, sig: CoseSignature) -> Self
pub fn add_counter_signature(self, sig: CoseSignature) -> Self
Add a counter signature.
sourcepub fn text_value(self, label: String, value: Value) -> Self
pub fn text_value(self, label: String, value: Value) -> Self
Set a header label:value pair where the label
is text.
Trait Implementations§
source§impl Debug for HeaderBuilder
impl Debug for HeaderBuilder
source§impl Default for HeaderBuilder
impl Default for HeaderBuilder
source§fn default() -> HeaderBuilder
fn default() -> HeaderBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HeaderBuilder
impl RefUnwindSafe for HeaderBuilder
impl Send for HeaderBuilder
impl Sync for HeaderBuilder
impl Unpin for HeaderBuilder
impl UnwindSafe for HeaderBuilder
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