pub enum Header {
Show 27 variants
Count(u32),
Name(Option<ObexString>),
Type(MimeType),
Length(u32),
TimeIso8601(NaiveDateTime),
Time4Byte(NaiveDateTime),
Description(ObexString),
Target(Vec<u8>),
Http(Vec<u8>),
Body(Vec<u8>),
EndOfBody(Vec<u8>),
Who(Vec<u8>),
ConnectionId(ConnectionIdentifier),
ApplicationParameters(TagLengthValue),
AuthenticationChallenge(Vec<u8>),
AuthenticationResponse(Vec<u8>),
CreatorId(u32),
WanUuid(Uuid),
ObjectClass(Vec<u8>),
SessionParameters(Vec<u8>),
SessionSequenceNumber(u8),
ActionId(ActionIdentifier),
DestName(ObexString),
Permissions(u32),
SingleResponseMode(SingleResponseMode),
SingleResponseModeParameters(u8),
User(UserDefinedHeader),
}
Expand description
The building block of an OBEX object. A single OBEX object consists of one or more Headers. Defined in OBEX 1.5 Section 2.0.
Variants§
Count(u32)
Name(Option<ObexString>)
The Name header can be empty which is a special parameter for the GET and SETPATH operations. It is also valid to provide a Name header with an empty OBEX string. See OBEX 1.5 Section 2.2.2.
Type(MimeType)
Length(u32)
Number of bytes.
TimeIso8601(NaiveDateTime)
Time represented as a well-formed NaiveDateTime (no timezone). This is typically UTC. See OBEX 1.5 Section 2.2.5.
Time4Byte(NaiveDateTime)
Time represented as the number of seconds elapsed since midnight UTC on January 1, 1970. This is saved as a well-formed NaiveDateTime (no timezone).
Description(ObexString)
Target(Vec<u8>)
Http(Vec<u8>)
Body(Vec<u8>)
EndOfBody(Vec<u8>)
Who(Vec<u8>)
ConnectionId(ConnectionIdentifier)
ApplicationParameters(TagLengthValue)
AuthenticationChallenge(Vec<u8>)
AuthenticationResponse(Vec<u8>)
CreatorId(u32)
WanUuid(Uuid)
ObjectClass(Vec<u8>)
SessionParameters(Vec<u8>)
SessionSequenceNumber(u8)
ActionId(ActionIdentifier)
DestName(ObexString)
Permissions(u32)
4-byte bit mask.
SingleResponseMode(SingleResponseMode)
SingleResponseModeParameters(u8)
1-byte quantity containing the parameters for the SRM session.
User(UserDefinedHeader)
User defined Header type.
Implementations§
Source§impl Header
impl Header
pub fn identifier(&self) -> HeaderIdentifier
pub fn name(s: &str) -> Self
pub fn empty_name() -> Self
Trait Implementations§
Source§impl Encodable for Header
impl Encodable for Header
Source§impl From<SingleResponseMode> for Header
impl From<SingleResponseMode> for Header
Source§fn from(src: SingleResponseMode) -> Header
fn from(src: SingleResponseMode) -> Header
Converts to this type from the input type.
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)