pub struct Corbaloc {
pub addresses: Vec<ObjAddr>,
pub key: Vec<u8>,
}Expand description
A corbaloc: URL: a list of addresses and an object key.
Parsing follows the specification and omniORB:
- an empty IIOP address means
localhoston the default port, - a missing port, or
:with no digits, means the default port, - the key is URL-unescaped (
%xx) into bytes; a URL without/has an empty key, - scheme and protocol names are matched without regard to case.
Display writes iiop: addresses with an explicit port
and escapes key bytes outside the characters the specification allows,
so parsing the output gives the same value.
Fields§
§addresses: Vec<ObjAddr>Addresses, at least one.
key: Vec<u8>Object key.
Implementations§
Source§impl Corbaloc
impl Corbaloc
Sourcepub fn iiop(
host: impl Into<String>,
port: u16,
key: impl Into<Vec<u8>>,
) -> Corbaloc
pub fn iiop( host: impl Into<String>, port: u16, key: impl Into<Vec<u8>>, ) -> Corbaloc
A corbaloc URL with one IIOP 1.0 address.
Sourcepub fn iiop_addresses(&self) -> impl Iterator<Item = &IiopAddr>
pub fn iiop_addresses(&self) -> impl Iterator<Item = &IiopAddr>
The IIOP addresses, in order.
Sourcepub fn to_ior(&self, order: ByteOrder) -> Result<Ior>
pub fn to_ior(&self, order: ByteOrder) -> Result<Ior>
Builds the IOR this URL stands for, the way omniORB does: no type
id, and one IIOP profile for the first IIOP address with the lowest
version of all of them. The other IIOP addresses become
ALTERNATE_IIOP_ADDRESS
components, which go in the IIOP profile from IIOP 1.1 on and in a
separate TAG_MULTIPLE_COMPONENTS profile for IIOP 1.0. Other
protocols are skipped.
Fails for rir: and when there is no IIOP address.