MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-repository/src/repository/git_stream.rs:310–317  ·  view source on GitHub ↗
(commits: usize, bytes: usize)

Source from the content-addressed store, hash-verified

308}
309impl GitStreamLimits {
310 pub fn new(commits: usize, bytes: usize) -> Result<Self, RepositoryError> {
311 if !(1..=256).contains(&commits) || !(1..=256 * 1024 * 1024).contains(&bytes) {
312 return Err(invalid(
313 "stream limits require 1..=256 commits and 1..=256 MiB",
314 ));
315 }
316 Ok(Self { commits, bytes })
317 }
318 pub fn commits(self) -> usize {
319 self.commits
320 }

Callers

nothing calls this directly

Calls 3

invalidFunction · 0.70
prepareFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected