pub struct MemoryBuffer(/* private fields */);
Expand description
Wrapper struct for a memory buffer, providing methods for working with an ngx_buf_t
.
Implementations§
Source§impl MemoryBuffer
impl MemoryBuffer
Sourcepub fn from_ngx_buf(buf: *mut ngx_buf_t) -> MemoryBuffer
pub fn from_ngx_buf(buf: *mut ngx_buf_t) -> MemoryBuffer
Creates a new MemoryBuffer
from an ngx_buf_t
pointer.
§Panics
Panics if the given buffer pointer is null.
Trait Implementations§
Source§impl Buffer for MemoryBuffer
impl Buffer for MemoryBuffer
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 moreAuto Trait Implementations§
impl Freeze for MemoryBuffer
impl RefUnwindSafe for MemoryBuffer
impl !Send for MemoryBuffer
impl !Sync for MemoryBuffer
impl Unpin for MemoryBuffer
impl UnwindSafe for MemoryBuffer
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