bit_types

    Shared types & traits (re-exports from bit_object)

    git
    types
    Download zip
    Author
    Version
    0.47.0
    License
    Apache-2.0
    Last updated
    7 hours ago
    Downloads
    899

    Dependencies

    Commit

    using @mizchi/bit_object { type Commit }

    Git commit object

    GitError

    Git operation errors

    HashAlgorithm

    HashState

    ObjectId

    Object identifier (20 bytes for SHA-1, 32 bytes for SHA-256)

    ObjectType

    Git object types

    PackCompression

    Compression mode for packfile entries

    PackDeltaMode

    Delta encoding mode for packfile generation

    PackObject

    A Git object ready for packing

    Sha1State

    Sha256State

    TreeEntry

    Tree entry in a Git tree object

    AsyncFileSystem

    pub(open) trait AsyncFileSystem {
    async fn mkdir_p(Self, String) -> Unit raise
    GitError

    async fn write_file(Self, String, Bytes) -> Unit raise
    GitError

    async fn write_string(Self, String, String) -> Unit raise
    GitError

    async fn remove_file(Self, String) -> Unit raise
    GitError

    async fn remove_dir(Self, String) -> Unit raise
    GitError

    }

    Asynchronous counterpart to FileSystem.

    AsyncHttpClient

    pub(open) trait AsyncHttpClient {
    async fn get(Self, String, Map[String, String]) -> (HttpResponse, Bytes) raise
    GitError

    async fn post(Self, String, Bytes, Map[String, String]) -> (HttpResponse, Bytes) raise
    GitError

    }

    Asynchronous counterpart to HttpClient.

    AsyncRepoFileSystem

    pub(open) trait AsyncRepoFileSystem {
    async fn read_file(Self, String) -> Bytes raise
    GitError

    async fn readdir(Self, String) -> Array[String] raise
    GitError

    async fn is_dir(Self, String) -> Bool raise
    GitError

    async fn is_file(Self, String) -> Bool raise
    GitError

    async fn mtime(Self, String) -> (Int, Int) raise
    GitError

    }

    Asynchronous counterpart to RepoFileSystem.

    FileSystem

    pub(open) trait FileSystem {
    fn mkdir_p(Self, String) -> Unit raise
    GitError

    fn write_file(Self, String, Bytes) -> Unit raise
    GitError

    fn write_string(Self, String, String) -> Unit raise
    GitError

    fn remove_file(Self, String) -> Unit raise
    GitError

    fn remove_dir(Self, String) -> Unit raise
    GitError

    }

    HttpClient

    pub(open) trait HttpClient {
    fn get(Self, String, Map[String, String]) -> (HttpResponse, Bytes) raise
    GitError

    fn post(Self, String, Bytes, Map[String, String]) -> (HttpResponse, Bytes) raise
    GitError

    }

    RepoFileSystem

    pub(open) trait RepoFileSystem {
    fn read_file(Self, String) -> Bytes raise
    GitError

    fn readdir(Self, String) -> Array[String] raise
    GitError

    fn is_dir(Self, String) -> Bool
    fn is_file(Self, String) -> Bool
    fn mtime(Self, String) -> (Int, Int) raise
    GitError

    }

    HttpResponse

    pub struct HttpResponse {
    code : Int
    headers : Map[String, String]
    }

    HttpResponse::new

    fn HttpResponse::new(code : Int) -> HttpResponse

    HttpResponse::with_headers

    fn HttpResponse::with_headers(code : Int, headers : Map[String, String]) -> HttpResponse

    MockHttpClient

    pub struct MockHttpClient {
    responses : Map[String, (Int, Bytes)]
    }

    MockHttpClient::add_response

    fn MockHttpClient::add_response(self : MockHttpClient, url : String, code : Int, body : Bytes) -> Unit

    MockHttpClient::new

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io