pub struct FakeEntityConverter;Expand description
No-op converter that always succeeds with entity ID 0; useful in test contexts where real mapping is not needed.
Trait Implementations§
Source§impl LocalEntityAndGlobalEntityConverter for FakeEntityConverter
impl LocalEntityAndGlobalEntityConverter for FakeEntityConverter
Source§fn global_entity_to_host_entity(
&self,
_: &GlobalEntity,
) -> Result<HostEntity, EntityDoesNotExistError>
fn global_entity_to_host_entity( &self, _: &GlobalEntity, ) -> Result<HostEntity, EntityDoesNotExistError>
Returns the
HostEntity for global_entity if one is registered, or an error otherwise.Source§fn global_entity_to_remote_entity(
&self,
_: &GlobalEntity,
) -> Result<RemoteEntity, EntityDoesNotExistError>
fn global_entity_to_remote_entity( &self, _: &GlobalEntity, ) -> Result<RemoteEntity, EntityDoesNotExistError>
Returns the
RemoteEntity for global_entity if one is registered, or an error otherwise.Source§fn global_entity_to_owned_entity(
&self,
_global_entity: &GlobalEntity,
) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
fn global_entity_to_owned_entity( &self, _global_entity: &GlobalEntity, ) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
Returns the
OwnedLocalEntity (host or remote) for global_entity, or an error if not found.Source§fn host_entity_to_global_entity(
&self,
_: &HostEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn host_entity_to_global_entity( &self, _: &HostEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for a dynamic host_entity, or an error if not found.Source§fn static_host_entity_to_global_entity(
&self,
_: &HostEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn static_host_entity_to_global_entity( &self, _: &HostEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for a static host_entity, or an error if not found.Source§fn remote_entity_to_global_entity(
&self,
_: &RemoteEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn remote_entity_to_global_entity( &self, _: &RemoteEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for remote_entity, or an error if not found.Source§fn apply_entity_redirect(&self, entity: &OwnedLocalEntity) -> OwnedLocalEntity
fn apply_entity_redirect(&self, entity: &OwnedLocalEntity) -> OwnedLocalEntity
Returns the current redirect target for
entity, or entity unchanged if no redirect is installed.Source§fn owned_entity_to_global_entity(
&self,
owned_entity: &OwnedLocalEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn owned_entity_to_global_entity( &self, owned_entity: &OwnedLocalEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for owned_entity, dispatching to the appropriate host or remote lookup.Source§impl LocalEntityAndGlobalEntityConverterMut for FakeEntityConverter
impl LocalEntityAndGlobalEntityConverterMut for FakeEntityConverter
Source§fn get_or_reserve_entity(
&mut self,
_global_entity: &GlobalEntity,
) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
fn get_or_reserve_entity( &mut self, _global_entity: &GlobalEntity, ) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
Looks up the local entity for
global_entity, reserving a new host slot if none exists yet.Auto Trait Implementations§
impl Freeze for FakeEntityConverter
impl RefUnwindSafe for FakeEntityConverter
impl Send for FakeEntityConverter
impl Sync for FakeEntityConverter
impl Unpin for FakeEntityConverter
impl UnsafeUnpin for FakeEntityConverter
impl UnwindSafe for FakeEntityConverter
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