pub struct AddressTranslator { /* private fields */ }Expand description
Type that can translate between SCION and IP addresses.
Implementations§
Source§impl AddressTranslator
impl AddressTranslator
Sourcepub fn new(build_hasher: FixedState) -> Self
pub fn new(build_hasher: FixedState) -> Self
Creates a new address translator.
Sourcepub fn register_scion_address(&self, addr: ScionAddr) -> IpAddr
pub fn register_scion_address(&self, addr: ScionAddr) -> IpAddr
Registers the SCION address and returns the corresponding IP address.
Sourcepub fn lookup_scion_address(&self, ip: IpAddr) -> Option<ScionAddr>
pub fn lookup_scion_address(&self, ip: IpAddr) -> Option<ScionAddr>
Looks up the SCION address for the given IP address.
Trait Implementations§
Source§impl Debug for AddressTranslator
impl Debug for AddressTranslator
Auto Trait Implementations§
impl !Freeze for AddressTranslator
impl RefUnwindSafe for AddressTranslator
impl Send for AddressTranslator
impl Sync for AddressTranslator
impl Unpin for AddressTranslator
impl UnwindSafe for AddressTranslator
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request