Method lrs::socket::cmsg::CMsgBuf::new

Creates a new CMsgBuf backed by allocated memory.

Syntax

impl<H> CMsgBuf<H>
    where H: Allocator,
          <H as Allocator>::Pool: Default,
{
    fn new() -> Result<CMsgBuf<H>, Errno>
}

Return value

Returns an allocated CMsgBuf.

Remarks

The buffer will be resized dynamically. This constructor fails if no memory can be allocated.