pub enum WriteMode {
Default,
Reliable,
WithoutResponse,
// some variants omitted
}
Expand description
Represents the supported write modes for writing characteristics & descriptors to the server.
Variants§
Default
In DEFAULT
mode, wait for a response from the server before returning
and do not verify the echo response.
Supported for both characteristics and descriptors.
Reliable
In RELIABLE
mode, every value blob is verified against an echo
response from the server. The procedure is aborted if a value blob has
not been reliably delivered to the peer.
Only supported for characteristics.
WithoutResponse
In WITHOUT_RESPONSE
mode, delivery will not be confirmed before
returning. Writing without a response is only supported for short
characteristics with the WRITE_WITHOUT_RESPONSE
property. The value
must fit into a single message. It is guaranteed that at least 20 bytes
will fit into a single message. If the value does not fit, a FAILURE
error will be produced. The value will be written at offset 0.
Only supported for characteristics.
Implementations§
Trait Implementations§
Source§impl<D> Decode<WriteMode, D> for WriteModewhere
D: ResourceDialect,
impl<D> Decode<WriteMode, D> for WriteModewhere
D: ResourceDialect,
Source§impl Ord for WriteMode
impl Ord for WriteMode
Source§impl PartialOrd for WriteMode
impl PartialOrd for WriteMode
Source§impl TypeMarker for WriteMode
impl TypeMarker for WriteMode
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for WriteMode
impl ValueTypeMarker for WriteMode
Source§type Borrowed<'a> = WriteMode
type Borrowed<'a> = WriteMode
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreSource§fn borrow(
value: &<WriteMode as TypeMarker>::Owned,
) -> <WriteMode as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<WriteMode as TypeMarker>::Owned, ) -> <WriteMode as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.