radish
Functions
pub fn decr(socket: Socket, key: String) -> Result(Int, Error)
subtracts 1 from an integer and returns the new value
pub fn decr_by(
socket: Socket,
key: String,
value: Int,
) -> Result(Int, Error)
subtracts an arbitrary value from an integer and returns the new value
pub fn incr(socket: Socket, key: String) -> Result(Int, Error)
adds 1 to an integer and returns the new value
pub fn incr_by(
socket: Socket,
key: String,
value: Int,
) -> Result(Int, Error)
adds an arbitrary value to an integer and returns the new value
pub fn incr_by_float(
socket: Socket,
key: String,
value: Float,
) -> Result(Float, Error)
adds an arbitrary float value to a number and returns the new value
pub fn set(
socket: Socket,
key: String,
value: String,
ttl: Option(Int),
) -> Result(String, Error)
pub fn set_existing(
socket: Socket,
key: String,
value: String,
ttl: Option(Int),
) -> Result(String, Error)
only sets a key if it already exists, returns the old value