ldap-client-0.4.1: Pure Haskell LDAP Client Library

Safe HaskellNone
LanguageHaskell2010

Ldap.Client.Compare

Description

Compare operation.

This operation comes in four flavours:

Of those, the first one (compare) is probably the most useful for the typical usecase.

Synopsis

Documentation

compare :: Ldap -> Dn -> Attr -> AttrValue -> IO Bool Source #

Perform the Compare operation synchronously. Raises ResponseError on failures.

compareEither :: Ldap -> Dn -> Attr -> AttrValue -> IO (Either ResponseError Bool) Source #

Perform the Compare operation synchronously. Returns Left e where e is a ResponseError on failures.

compareAsync :: Ldap -> Dn -> Attr -> AttrValue -> IO (Async Bool) Source #

Perform the Compare operation asynchronously. Call wait to wait for its completion.

compareAsyncSTM :: Ldap -> Dn -> Attr -> AttrValue -> STM (Async Bool) Source #

Perform the Compare operation asynchronously.

Don't wait for its completion (with waitSTM) in the same transaction you've performed it in.

data Async a Source #

Asynchronous LDAP operation. Use wait or waitSTM to wait for its completion.

Instances
Functor Async Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

fmap :: (a -> b) -> Async a -> Async b #

(<$) :: a -> Async b -> Async a #

wait :: Async a -> IO (Either ResponseError a) Source #

Wait for operation completion.

waitSTM :: Async a -> STM (Either ResponseError a) Source #

Wait for operation completion inside STM.

Do not use this inside the same STM transaction the operation was requested in! To give LDAP the chance to respond to it that transaction should commit. After that, applying waitSTM to the corresponding Async starts to make sense.