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§
Source§impl WriteMode
impl WriteMode
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<WriteMode, D> for WriteMode
impl<D: ResourceDialect> Decode<WriteMode, D> for WriteMode
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
impl Copy for WriteMode
impl Eq for WriteMode
impl StructuralPartialEq for WriteMode
Auto Trait Implementations§
impl Freeze for WriteMode
impl RefUnwindSafe for WriteMode
impl Send for WriteMode
impl Sync for WriteMode
impl Unpin for WriteMode
impl UnwindSafe for WriteMode
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
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)
clone_to_uninit
)