__rhandle = $rhandle; $this->__epoch = $epoch; } public function __destruct() { \ShirabeRustObjectRegistry::release($this->__rhandle); } public function __shirabeRustHandleDescriptor(): array { return [ '__rhandle' => $this->__rhandle, '__class' => static::class, '__epoch' => $this->__epoch, ]; } public function findPackage(string $name, $constraint): ?PackageInterface { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'findPackage', [$name, $constraint]); } public function findPackages(string $name, $constraint): array { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'findPackages', [$name, $constraint]); } public function addRepository(RepositoryInterface $repository): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'addRepository', [$repository]); } public function prependRepository(RepositoryInterface $repository): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'prependRepository', [$repository]); } public function createRepository(string $type, array $config, ?string $name = null): RepositoryInterface { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'createRepository', [$type, $config, $name]); } public function setRepositoryClass(string $type, $class): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setRepositoryClass', [$type, $class]); } public function getRepositories(): array { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getRepositories', []); } public function setLocalRepository(InstalledRepositoryInterface $repository): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setLocalRepository', [$repository]); } public function getLocalRepository(): InstalledRepositoryInterface { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getLocalRepository', []); } }