pub struct CodeSets {
pub char_data: u32,
pub wchar_data: Option<u32>,
}Expand description
The transmission code sets used on a connection.
Fields§
§char_data: u32Transmission code set for char and string.
wchar_data: Option<u32>Transmission code set for wchar and wstring, or None when the
server did not publish one.
Implementations§
Source§impl CodeSets
impl CodeSets
Sourcepub const DEFAULT: CodeSets
pub const DEFAULT: CodeSets
The code sets that apply without negotiation: ISO 8859-1 for
char and no wchar code set. GIOP 1.0, and objects whose IOR has
no code set component, use these.
Sourcepub const NATIVE: CodeSets
pub const NATIVE: CodeSets
The native code sets of rustorb, UTF-8 and UTF-16: what values marshalled outside a connection use.
Sourcepub fn negotiate(
info: &CodeSetComponentInfo,
) -> Result<CodeSets, SystemException>
pub fn negotiate( info: &CodeSetComponentInfo, ) -> Result<CodeSets, SystemException>
Chooses the transmission code sets for a server that published
info, as the client side of the negotiation.
Sourcepub fn context(&self) -> CodeSetContext
pub fn context(&self) -> CodeSetContext
The CodeSets service context announcing these code sets. A
missing wchar code set is sent as 0.
Sourcepub fn encode_string(&self, s: &str) -> Result<Vec<u8>, SystemException>
pub fn encode_string(&self, s: &str) -> Result<Vec<u8>, SystemException>
Encodes s in the char transmission code set.
Sourcepub fn decode_string(&self, bytes: &[u8]) -> Result<String, SystemException>
pub fn decode_string(&self, bytes: &[u8]) -> Result<String, SystemException>
Decodes bytes from the char transmission code set.
Trait Implementations§
impl Copy for CodeSets
impl Eq for CodeSets
impl StructuralPartialEq for CodeSets
Auto Trait Implementations§
impl Forget for CodeSets
impl Freeze for CodeSets
impl RefUnwindSafe for CodeSets
impl Send for CodeSets
impl Sync for CodeSets
impl Unpin for CodeSets
impl UnsafeUnpin for CodeSets
impl UnwindSafe for CodeSets
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