ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Snapshot

Description

A projection scoped to the upstream bytes it came from. Adapters retain the fetch digest while transforming either the typed or raw view.

Synopsis

Documentation

data Snapshot a Source #

A view paired with the digest computed before projection. Producers must use the same fetch. Mapping preserves the snapshot scope.

Constructors

Snapshot 

Instances

Instances details
Functor Snapshot Source # 
Instance details

Defined in Ecluse.Core.Snapshot

Methods

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

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

Foldable Snapshot Source # 
Instance details

Defined in Ecluse.Core.Snapshot

Methods

fold :: Monoid m => Snapshot m -> m #

foldMap :: Monoid m => (a -> m) -> Snapshot a -> m #

foldMap' :: Monoid m => (a -> m) -> Snapshot a -> m #

foldr :: (a -> b -> b) -> b -> Snapshot a -> b #

foldr' :: (a -> b -> b) -> b -> Snapshot a -> b #

foldl :: (b -> a -> b) -> b -> Snapshot a -> b #

foldl' :: (b -> a -> b) -> b -> Snapshot a -> b #

foldr1 :: (a -> a -> a) -> Snapshot a -> a #

foldl1 :: (a -> a -> a) -> Snapshot a -> a #

toList :: Snapshot a -> [a] #

null :: Snapshot a -> Bool #

length :: Snapshot a -> Int #

elem :: Eq a => a -> Snapshot a -> Bool #

maximum :: Ord a => Snapshot a -> a #

minimum :: Ord a => Snapshot a -> a #

sum :: Num a => Snapshot a -> a #

product :: Num a => Snapshot a -> a #

Traversable Snapshot Source # 
Instance details

Defined in Ecluse.Core.Snapshot

Methods

traverse :: Applicative f => (a -> f b) -> Snapshot a -> f (Snapshot b) #

sequenceA :: Applicative f => Snapshot (f a) -> f (Snapshot a) #

mapM :: Monad m => (a -> m b) -> Snapshot a -> m (Snapshot b) #

sequence :: Monad m => Snapshot (m a) -> m (Snapshot a) #

Show a => Show (Snapshot a) Source # 
Instance details

Defined in Ecluse.Core.Snapshot

Methods

showsPrec :: Int -> Snapshot a -> ShowS #

show :: Snapshot a -> String #

showList :: [Snapshot a] -> ShowS #

Eq a => Eq (Snapshot a) Source # 
Instance details

Defined in Ecluse.Core.Snapshot

Methods

(==) :: Snapshot a -> Snapshot a -> Bool #

(/=) :: Snapshot a -> Snapshot a -> Bool #

digestBytes :: ContentDigest -> ByteString Source #

The digest's raw 32 bytes, for feeding into a wider fingerprint.

digestFromContext :: Context SHA256 -> ContentDigest Source #

Finish the SHA-256 state accumulated from the exact consumed source chunks.