pub enum PointerAddress {
SelfOwned(SelfOwnedPointerAddress),
Remote(RemotePointerAddress),
}Variants§
SelfOwned(SelfOwnedPointerAddress)
Remote(RemotePointerAddress)
Implementations§
Source§impl PointerAddress
impl PointerAddress
pub fn self_owned(address: [u8; 5]) -> Self
pub fn remote(address: [u8; 26]) -> Self
Sourcepub fn normalize_for_local(self, local_endpoint: &Endpoint) -> Self
pub fn normalize_for_local(self, local_endpoint: &Endpoint) -> Self
Normalizes the pointer address to a self-owned address if it is a remote address with the same endpoint as the provided local endpoint.
Source§impl PointerAddress
impl PointerAddress
pub fn to_address_string(&self) -> String
Trait Implementations§
Source§impl BinRead for PointerAddress
impl BinRead for PointerAddress
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for PointerAddress
impl BinWrite for PointerAddress
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write<W>(&self, writer: &mut W) -> Result<(), Error>
fn write<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer using default arguments. Read moreSource§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming native-endian byte order. Read moreSource§fn write_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer using the given arguments. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for PointerAddress
impl Clone for PointerAddress
Source§impl Debug for PointerAddress
impl Debug for PointerAddress
Source§impl<'de> Deserialize<'de> for PointerAddress
impl<'de> Deserialize<'de> for PointerAddress
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 Display for PointerAddress
impl Display for PointerAddress
impl Eq for PointerAddress
Source§impl From<RemotePointerAddress> for PointerAddress
impl From<RemotePointerAddress> for PointerAddress
Source§fn from(remote: RemotePointerAddress) -> Self
fn from(remote: RemotePointerAddress) -> Self
Converts to this type from the input type.
Source§impl From<SelfOwnedPointerAddress> for PointerAddress
impl From<SelfOwnedPointerAddress> for PointerAddress
Source§fn from(owned: SelfOwnedPointerAddress) -> Self
fn from(owned: SelfOwnedPointerAddress) -> Self
Converts to this type from the input type.
Source§impl Hash for PointerAddress
impl Hash for PointerAddress
Source§impl PartialEq for PointerAddress
impl PartialEq for PointerAddress
Source§impl ReadEndian for PointerAddress
impl ReadEndian for PointerAddress
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Source§impl Serialize for PointerAddress
impl Serialize for PointerAddress
impl StructuralPartialEq for PointerAddress
Source§impl TryFrom<&str> for PointerAddress
impl TryFrom<&str> for PointerAddress
Source§impl TryFrom<String> for PointerAddress
impl TryFrom<String> for PointerAddress
Source§impl TypeSuperset<PointerAddress> for EntityType
impl TypeSuperset<PointerAddress> for EntityType
Source§fn is_superset_of(&self, other: &PointerAddress) -> bool
fn is_superset_of(&self, other: &PointerAddress) -> bool
Returns whether self is a superset of type
Source§impl WriteEndian for PointerAddress
impl WriteEndian for PointerAddress
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Auto Trait Implementations§
impl Forget for PointerAddress
impl Freeze for PointerAddress
impl Move for PointerAddress
impl RefUnwindSafe for PointerAddress
impl Send for PointerAddress
impl Sync for PointerAddress
impl Unpin for PointerAddress
impl UnsafeUnpin for PointerAddress
impl UnwindSafe for PointerAddress
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,
Source§impl<T> CustomError for T
impl<T> CustomError for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T, U> TypeSubset<U> for Twhere
U: TypeSuperset<T>,
impl<T, U> TypeSubset<U> for Twhere
U: TypeSuperset<T>,
Source§fn is_subset_of(&self, other: &U) -> bool
fn is_subset_of(&self, other: &U) -> bool
Returns whether self is a subset of type