pub struct InterfaceId(pub [u8; 8]);Expand description
Unique identifier for a service (or “interface” in terms of sails binary protocol).
For more information about interface IDs, see the interface ID spec.
Tuple Fields§
§0: [u8; 8]Implementations§
Source§impl InterfaceId
impl InterfaceId
Sourcepub const fn zero() -> InterfaceId
pub const fn zero() -> InterfaceId
Create a zeroed interface ID.
Sourcepub const fn from_bytes_32(bytes: [u8; 32]) -> InterfaceId
pub const fn from_bytes_32(bytes: [u8; 32]) -> InterfaceId
Create interface ID from bytes.
Sourcepub const fn from_bytes_8(bytes: [u8; 8]) -> InterfaceId
pub const fn from_bytes_8(bytes: [u8; 8]) -> InterfaceId
Create interface ID from bytes.
Sourcepub const fn from_u64(int: u64) -> InterfaceId
pub const fn from_u64(int: u64) -> InterfaceId
Create interface ID from u64.
Sourcepub fn try_read_bytes(bytes: &mut &[u8]) -> Result<InterfaceId, &'static str>
pub fn try_read_bytes(bytes: &mut &[u8]) -> Result<InterfaceId, &'static str>
Deserialize from bytes, advancing the slice
Sourcepub fn try_from_bytes(bytes: &[u8]) -> Result<InterfaceId, &'static str>
pub fn try_from_bytes(bytes: &[u8]) -> Result<InterfaceId, &'static str>
Deserialize from bytes without mutating the input
Trait Implementations§
Source§impl Clone for InterfaceId
impl Clone for InterfaceId
Source§fn clone(&self) -> InterfaceId
fn clone(&self) -> InterfaceId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InterfaceId
Source§impl Debug for InterfaceId
impl Debug for InterfaceId
Source§impl Decode for InterfaceId
impl Decode for InterfaceId
Source§fn decode<I>(input: &mut I) -> Result<InterfaceId, Error>where
I: Input,
fn decode<I>(input: &mut I) -> Result<InterfaceId, Error>where
I: Input,
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl Display for InterfaceId
impl Display for InterfaceId
Source§impl Encode for InterfaceId
impl Encode for InterfaceId
Source§fn encode_to<O>(&self, dest: &mut O)
fn encode_to<O>(&self, dest: &mut O)
Convert self to a slice and append it to the destination.
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl Eq for InterfaceId
Source§impl FromStr for InterfaceId
impl FromStr for InterfaceId
Source§impl PartialEq for InterfaceId
impl PartialEq for InterfaceId
Source§fn eq(&self, other: &InterfaceId) -> bool
fn eq(&self, other: &InterfaceId) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InterfaceId
Auto Trait Implementations§
impl Freeze for InterfaceId
impl RefUnwindSafe for InterfaceId
impl Send for InterfaceId
impl Sync for InterfaceId
impl Unpin for InterfaceId
impl UnsafeUnpin for InterfaceId
impl UnwindSafe for InterfaceId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S> Codec for S
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> EncodeLike<&&T> for Twhere
T: Encode,
impl<T> EncodeLike<&T> for Twhere
T: Encode,
impl<T> EncodeLike<&mut T> for Twhere
T: Encode,
impl<T> EncodeLike<Arc<T>> for Twhere
T: Encode,
impl<T> EncodeLike<Box<T>> for Twhere
T: Encode,
impl<T> EncodeLike<Cow<'_, T>> for T
impl<T> EncodeLike<Rc<T>> for Twhere
T: Encode,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.