MCPcopy Create free account
hub / github.com/AndrewGi/btle / resize

Method resize

src/bytes.rs:244–252  ·  view source on GitHub ↗

Resizes the `StaticBuf` by settings `self.len` to `new_size` if `new_size <= Self::max_size()`. This is only a single variable change and WILL NOT zero or change any of the buffers bytes. # Panics Panics if the new size is greater than max_size (`new_size > Self::max_size()`). # Examples ``` use btle::bytes::{StaticBuf, Storage}; let mut buf = StaticBuf:: ::with_size(10); assert_eq!(b

(&mut self, new_size: usize)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

append_sliceMethod · 0.80
insertMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected