Skip to main content

Oop

Struct Oop 

Source
pub struct Oop(pub u64);

Tuple Fields§

§0: u64

Implementations§

Source§

impl Oop

Source

pub const ILLEGAL: Oop

Source

pub const NIL: Oop

Source

pub const FALSE: Oop

Source

pub const TRUE: Oop

Source

pub fn from_smallint(value: i64) -> Oop

Source

pub fn from_bool(value: bool) -> Oop

Source

pub fn from_char(value: char) -> Oop

Source

pub fn raw(self) -> u64

Examples found in repository?
examples/oop_values.rs (line 21)
8fn main() -> gemstone_rs::Result<()> {
9    let mut session = Session::login(Config::from_env()?)?;
10
11    let seven = session.value_to_oop(&Value::SmallInt(7))?;
12    let printed = session.perform_oop(seven, "printString", &[])?;
13    println!(
14        "small integer printString: {}",
15        session.fetch_string(printed)?
16    );
17
18    let text = session.new_string("retained by gemstone-rs")?;
19    {
20        let handle = session.retain_oop(text)?;
21        println!("retained string OOP: {}", handle.oop().raw());
22        handle.release()?;
23    }
24
25    let symbol = session.new_symbol("GemStoneRsExampleSymbol")?;
26    println!("new symbol OOP: {}", symbol.raw());
27    Ok(())
28}
More examples
Hide additional examples
examples/bridge_root_mapping.rs (line 57)
39fn main() -> gemstone_rs::Result<()> {
40    let mut session = Session::login(Config::from_env()?)?;
41
42    let payload = BookingDraft {
43        name: "Tariq".to_string(),
44        amount: 100,
45        currency: "GBP".to_string(),
46    };
47
48    let mut bridge_root = session.bridge_root()?;
49    let payload_oop = bridge_root.put_mapped("MyTestDict", &payload)?;
50    let stored = bridge_root.get_oop("MyTestDict")?;
51    assert_eq!(payload_oop, stored);
52
53    let loaded: BookingDraft = bridge_root.get_mapped("MyTestDict")?;
54    assert_eq!(loaded, payload);
55
56    println!("bridge root: {}", bridge_root.name());
57    println!("bridge root OOP: {}", bridge_root.oop().raw());
58    println!("MyTestDict OOP: {}", stored.raw());
59    println!("loaded payload: {loaded:?}");
60
61    bridge_root.commit()?;
62    Ok(())
63}
Source

pub fn is_illegal(self) -> bool

Source

pub fn is_nil(self) -> bool

Source

pub fn is_boolean(self) -> bool

Source

pub fn as_bool(self) -> Option<bool>

Source

pub fn is_smallint(self) -> bool

Source

pub fn as_smallint(self) -> Option<i64>

Source

pub fn is_char(self) -> bool

Source

pub fn as_char(self) -> Result<Option<char>, GciError>

Trait Implementations§

Source§

impl BridgeFieldRead for Oop

Source§

fn read_bridge_oop( session: &mut Session, oop: Oop, _context: &BridgeFieldContext, ) -> Result<Self>

Source§

fn expected_type() -> &'static str

Source§

fn read_bridge_field( dictionary: &mut BridgeDictionary<'_>, key: &str, key_type: BridgeKeyType, ) -> Result<Self>

Source§

impl BridgeFieldWrite for Oop

Source§

impl Clone for Oop

Source§

fn clone(&self) -> Oop

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Oop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<Oop> for BridgeValue

Source§

fn from(value: Oop) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for Oop

Source§

fn from(value: u64) -> Oop

Converts to this type from the input type.
Source§

impl Hash for Oop

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Oop

Source§

fn eq(&self, other: &Oop) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Oop

Source§

impl Eq for Oop

Source§

impl StructuralPartialEq for Oop

Auto Trait Implementations§

§

impl Freeze for Oop

§

impl RefUnwindSafe for Oop

§

impl Send for Oop

§

impl Sync for Oop

§

impl Unpin for Oop

§

impl UnsafeUnpin for Oop

§

impl UnwindSafe for Oop

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.