Module: Prosody::NativeValueOperations

Included in:
NativeJsonValueState, NativeMessageValueState
Defined in:
lib/prosody/native_stubs.rb

Overview

Native single-value keyed-state handle, vended by the context and wrapped by ValueState. Every operation is fiber-yield async: it crosses the bridge and yields the fiber while the Rust core drives the operation.

See Also:

  • for implementation

Instance Method Summary collapse

Instance Method Details

#clearvoid

This method returns an undefined value.

Buffers a clear of the value.

Raises:

  • (NotImplementedError)


572
573
574
# File 'lib/prosody/native_stubs.rb', line 572

def clear
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#commitnil

Durably commits the buffered operations mid-handler.

Returns:

  • (nil)

Raises:

  • (NotImplementedError)


579
580
581
# File 'lib/prosody/native_stubs.rb', line 579

def commit
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#getObject?

Reads the current value.

Returns:

  • (Object, nil)

    the stored value, or nil when absent

Raises:

  • (NotImplementedError)


555
556
557
# File 'lib/prosody/native_stubs.rb', line 555

def get
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#initializeObject

Raises:

  • (NotImplementedError)


548
549
550
# File 'lib/prosody/native_stubs.rb', line 548

def initialize
  raise NotImplementedError, "This class is implemented natively in Rust"
end

#rollbacknil

Discards the buffered uncommitted operations.

Returns:

  • (nil)

Raises:

  • (NotImplementedError)


586
587
588
# File 'lib/prosody/native_stubs.rb', line 586

def rollback
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#set(value) ⇒ void

This method returns an undefined value.

Buffers a write of the value.

Parameters:

  • value (Object)

    the value to store

Raises:



565
566
567
# File 'lib/prosody/native_stubs.rb', line 565

def set(value)
  raise NotImplementedError, "This method is implemented natively in Rust"
end