pub struct TemporaryBuffer(/* private fields */);
Expand description
Wrapper struct for a temporary buffer, providing methods for working with an ngx_buf_t
.
Implementations§
Source§impl TemporaryBuffer
impl TemporaryBuffer
Sourcepub fn from_ngx_buf(buf: *mut ngx_buf_t) -> TemporaryBuffer
pub fn from_ngx_buf(buf: *mut ngx_buf_t) -> TemporaryBuffer
Creates a new TemporaryBuffer
from an ngx_buf_t
pointer.
§Panics
Panics if the given buffer pointer is null.
Trait Implementations§
Source§impl Buffer for TemporaryBuffer
impl Buffer for TemporaryBuffer
Source§fn as_ngx_buf(&self) -> *const ngx_buf_t
fn as_ngx_buf(&self) -> *const ngx_buf_t
Returns the underlying ngx_buf_t
pointer as a raw pointer.
Source§fn as_ngx_buf_mut(&mut self) -> *mut ngx_buf_t
fn as_ngx_buf_mut(&mut self) -> *mut ngx_buf_t
Returns a mutable reference to the underlying ngx_buf_t
pointer.
Source§fn set_last_buf(&mut self, last: bool)
fn set_last_buf(&mut self, last: bool)
Sets the
last_buf
flag of the buffer. Read moreSource§fn set_last_in_chain(&mut self, last: bool)
fn set_last_in_chain(&mut self, last: bool)
Sets the
last_in_chain
flag of the buffer. Read moreSource§impl MutableBuffer for TemporaryBuffer
impl MutableBuffer for TemporaryBuffer
Source§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Returns a mutable reference to the buffer contents as a byte slice.
Auto Trait Implementations§
impl Freeze for TemporaryBuffer
impl RefUnwindSafe for TemporaryBuffer
impl !Send for TemporaryBuffer
impl !Sync for TemporaryBuffer
impl Unpin for TemporaryBuffer
impl UnwindSafe for TemporaryBuffer
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