Struct x11rb_protocol::protocol::shm::CreateSegmentRequest
source · pub struct CreateSegmentRequest {
pub shmseg: Seg,
pub size: u32,
pub read_only: bool,
}
Expand description
Asks the server to allocate a shared memory segment..
Asks the server to allocate a shared memory segment. The server’s reply will include a file descriptor for the client to pass to mmap().
§Fields
shmseg
- A shared memory segment ID created with xcb_generate_id().size
- The size of the segment to create.read_only
- True if the server should map the segment read-only; otherwise false.
Fields§
§shmseg: Seg
§size: u32
§read_only: bool
Implementations§
source§impl CreateSegmentRequest
impl CreateSegmentRequest
sourcepub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'static, [u8]>; 1]>
pub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'static, [u8]>; 1]>
Serialize this request into bytes for the provided connection
sourcepub fn try_parse_request(
header: RequestHeader,
value: &[u8]
) -> Result<Self, ParseError>
pub fn try_parse_request( header: RequestHeader, value: &[u8] ) -> Result<Self, ParseError>
Parse this request given its header, its body, and any fds that go along with it
Trait Implementations§
source§impl Clone for CreateSegmentRequest
impl Clone for CreateSegmentRequest
source§fn clone(&self) -> CreateSegmentRequest
fn clone(&self) -> CreateSegmentRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreateSegmentRequest
impl Debug for CreateSegmentRequest
source§impl Default for CreateSegmentRequest
impl Default for CreateSegmentRequest
source§fn default() -> CreateSegmentRequest
fn default() -> CreateSegmentRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CreateSegmentRequest
impl<'de> Deserialize<'de> for CreateSegmentRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for CreateSegmentRequest
impl Hash for CreateSegmentRequest
source§impl Ord for CreateSegmentRequest
impl Ord for CreateSegmentRequest
source§fn cmp(&self, other: &CreateSegmentRequest) -> Ordering
fn cmp(&self, other: &CreateSegmentRequest) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CreateSegmentRequest
impl PartialEq for CreateSegmentRequest
source§fn eq(&self, other: &CreateSegmentRequest) -> bool
fn eq(&self, other: &CreateSegmentRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CreateSegmentRequest
impl PartialOrd for CreateSegmentRequest
source§fn partial_cmp(&self, other: &CreateSegmentRequest) -> Option<Ordering>
fn partial_cmp(&self, other: &CreateSegmentRequest) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ReplyFDsRequest for CreateSegmentRequest
impl ReplyFDsRequest for CreateSegmentRequest
§type Reply = CreateSegmentReply
type Reply = CreateSegmentReply
The kind of reply that this request generates.
source§impl Request for CreateSegmentRequest
impl Request for CreateSegmentRequest
source§impl Serialize for CreateSegmentRequest
impl Serialize for CreateSegmentRequest
impl Copy for CreateSegmentRequest
impl Eq for CreateSegmentRequest
impl StructuralPartialEq for CreateSegmentRequest
Auto Trait Implementations§
impl Freeze for CreateSegmentRequest
impl RefUnwindSafe for CreateSegmentRequest
impl Send for CreateSegmentRequest
impl Sync for CreateSegmentRequest
impl Unpin for CreateSegmentRequest
impl UnwindSafe for CreateSegmentRequest
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