Struct ServerEnd

Source
pub struct ServerEnd<T: ProtocolMarker> { /* private fields */ }
Expand description

The Server end of a FIDL connection.

Implementations§

Source§

impl<T: ProtocolMarker> ServerEnd<T>

Source

pub fn new(inner: Channel) -> ServerEnd<T>

Create a new ServerEnd from the provided channel.

Source

pub fn channel(&self) -> &Channel

Get a reference to the underlying channel

Source

pub fn into_channel(self) -> Channel

Extract the inner channel.

Source

pub fn into_stream(self) -> T::RequestStream
where T: ProtocolMarker,

Create a stream of requests off of the channel.

Source

pub fn into_stream_and_control_handle( self, ) -> (T::RequestStream, <T::RequestStream as RequestStream>::ControlHandle)
where T: ProtocolMarker,

Create a stream of requests and an event-sending handle from the channel.

Source

pub fn close_with_epitaph(self, status: Status) -> Result<(), Error>

Writes an epitaph into the underlying channel before closing it.

Trait Implementations§

Source§

impl<T: ProtocolMarker> AsHandleRef for ServerEnd<T>

Source§

fn as_handle_ref(&self) -> HandleRef<'_>

Source§

fn object_type() -> ObjectType

Source§

fn signal_handle( &self, set: Signals, clear: Signals, ) -> impl Future<Output = Result<(), Error>>

Source§

fn domain(&self) -> Arc<Client>

Get the client supporting this handle. See fidl::Proxy::domain.
Source§

impl<T: Debug + ProtocolMarker> Debug for ServerEnd<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ProtocolMarker> EncodableAsHandle for ServerEnd<T>

Source§

type Dialect = FDomainResourceDialect

What resource dialect can encode this object as a handle.
Source§

impl<T: ProtocolMarker> From<Channel> for ServerEnd<T>

Source§

fn from(chan: Channel) -> Self

Converts to this type from the input type.
Source§

impl<T: ProtocolMarker> From<Handle> for ServerEnd<T>

Source§

fn from(handle: Handle) -> Self

Converts to this type from the input type.
Source§

impl<T: ProtocolMarker> From<ServerEnd<T>> for Handle

Source§

fn from(server: ServerEnd<T>) -> Handle

Converts to this type from the input type.
Source§

impl<T: Hash + ProtocolMarker> Hash for ServerEnd<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: Ord + ProtocolMarker> Ord for ServerEnd<T>

Source§

fn cmp(&self, other: &ServerEnd<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: PartialEq + ProtocolMarker> PartialEq for ServerEnd<T>

Source§

fn eq(&self, other: &ServerEnd<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd + ProtocolMarker> PartialOrd for ServerEnd<T>

Source§

fn partial_cmp(&self, other: &ServerEnd<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T: Eq + ProtocolMarker> Eq for ServerEnd<T>

Source§

impl<T: ProtocolMarker> StructuralPartialEq for ServerEnd<T>

Auto Trait Implementations§

§

impl<T> Freeze for ServerEnd<T>

§

impl<T> RefUnwindSafe for ServerEnd<T>
where T: RefUnwindSafe,

§

impl<T> Send for ServerEnd<T>

§

impl<T> Sync for ServerEnd<T>

§

impl<T> Unpin for ServerEnd<T>
where T: Unpin,

§

impl<T> UnwindSafe for ServerEnd<T>
where T: 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
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. 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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V