Skip to main content

Channel

Struct Channel 

Source
pub struct Channel { /* private fields */ }

Implementations§

Source§

impl Channel

Source

pub const FRAME_MAX: usize

Source

pub const FDS_MAX: usize = 64

Source

pub const BIG_MAX: usize

Source

pub fn new(fd: OwnedFd) -> Self

Source

pub fn try_clone(&self) -> Result<Self, String>

Source

pub fn send(&self, frame: &Value, wait: bool) -> Result<(), String>

Source

pub fn pack(frame: &Value) -> Result<Packet, String>

Source

pub fn pack_with_fd(frame: &Value, fd: OwnedFd) -> Result<Packet, String>

Source

pub fn pack_with_fds(frame: &Value, fds: Vec<OwnedFd>) -> Result<Packet, String>

Source

pub fn offer(&self, packet: &Packet) -> Result<bool, String>

Source

pub fn send_with_fd( &self, frame: &Value, fd: BorrowedFd<'_>, wait: bool, ) -> Result<(), String>

Source

pub fn send_with_fds( &self, frame: &Value, fds: &[BorrowedFd<'_>], wait: bool, ) -> Result<(), String>

Source

pub fn receive(&self, wait: bool) -> Result<Received, String>

Source

pub fn receive_with_fd( &self, wait: bool, ) -> Result<(Received, Option<OwnedFd>), String>

Source

pub fn receive_with_fds( &self, wait: bool, ) -> Result<(Received, Vec<OwnedFd>), String>

Trait Implementations§

Source§

impl AsFd for Channel

Source§

fn as_fd(&self) -> BorrowedFd<'_>

Borrows the file descriptor. Read more

Auto Trait Implementations§

§

impl Forget for Channel

§

impl Freeze for Channel
where I32NotAllOnes: Freeze,

§

impl Move for Channel

§

impl RefUnwindSafe for Channel
where I32NotAllOnes: RefUnwindSafe,

§

impl Send for Channel
where I32NotAllOnes: Send,

§

impl Sync for Channel
where I32NotAllOnes: Sync,

§

impl Unpin for Channel
where I32NotAllOnes: Unpin,

§

impl UnsafeUnpin for Channel
where I32NotAllOnes: UnsafeUnpin,

§

impl UnwindSafe for Channel
where I32NotAllOnes: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.