bt_obex::operation

Type Alias ResponsePacket

Source
pub type ResponsePacket = Packet<ResponseCode>;
Expand description

An OBEX response packet. Defined in OBEX 1.5 Section 3.2.

Aliased Type§

struct ResponsePacket { /* private fields */ }

Implementations§

Source§

impl ResponsePacket

Source

pub fn new_no_data(code: ResponseCode, headers: HeaderSet) -> Self

Source

pub fn new_connect( code: ResponseCode, max_packet_size: u16, headers: HeaderSet, ) -> Self

Source

pub fn new_disconnect(headers: HeaderSet) -> Self

Source

pub fn new_setpath(code: ResponseCode, headers: HeaderSet) -> Self

Source

pub fn new_get(code: ResponseCode, headers: HeaderSet) -> Self

Source

pub fn expect_code( self, request: OpCode, expected: ResponseCode, ) -> Result<Self, Error>

Source

pub fn decode(buf: &[u8], request: OpCode) -> Result<Self, PacketError>

Attempts to decode the raw buf into a ResponsePacket for the provided request type.