pub struct LocalRegistry { /* private fields */ }Expand description
A registry serving packs on the machine until it is dropped.
use compmd_host::registry::{LocalRegistry, ServedPack};
let mermaid = ServedPack::new("@kit/mermaid").version("1.2.0", &[("package.json", "{}")]);
let registry = LocalRegistry::serve(&[mermaid])?;
assert!(registry.url().starts_with("http://127.0.0.1:"));Implementations§
Source§impl LocalRegistry
impl LocalRegistry
Sourcepub fn serve(packs: &[ServedPack]) -> Result<Self>
pub fn serve(packs: &[ServedPack]) -> Result<Self>
Trait Implementations§
Source§impl Debug for LocalRegistry
impl Debug for LocalRegistry
Source§impl Drop for LocalRegistry
Stops serving: the port is closed, so what asks it next can’t connect.
impl Drop for LocalRegistry
Stops serving: the port is closed, so what asks it next can’t connect.
Auto Trait Implementations§
impl Forget for LocalRegistry
impl Freeze for LocalRegistry
impl Move for LocalRegistry
impl RefUnwindSafe for LocalRegistry
impl Send for LocalRegistry
impl Sync for LocalRegistry
impl Unpin for LocalRegistry
impl UnsafeUnpin for LocalRegistrywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Mutex<Vec<String>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Vec<String>>>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
impl UnwindSafe for LocalRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more