pub struct NetworkService<T: NetworkRepositoryTrait> { /* private fields */ }
Expand description
Service layer for network repository operations
This type provides a higher-level interface for working with network configurations, handling repository initialization and access through a trait-based interface.
Implementations§
Source§impl<T: NetworkRepositoryTrait> NetworkService<T>
impl<T: NetworkRepositoryTrait> NetworkService<T>
Sourcepub async fn new(
path: Option<&Path>,
) -> Result<NetworkService<NetworkRepository>, RepositoryError>
pub async fn new( path: Option<&Path>, ) -> Result<NetworkService<NetworkRepository>, RepositoryError>
Create a new network service with the default repository implementation
Sourcepub fn new_with_repository(repository: T) -> Result<Self, RepositoryError>
pub fn new_with_repository(repository: T) -> Result<Self, RepositoryError>
Create a new network service with a custom repository implementation
Sourcepub async fn new_with_path(
path: Option<&Path>,
) -> Result<NetworkService<NetworkRepository>, RepositoryError>
pub async fn new_with_path( path: Option<&Path>, ) -> Result<NetworkService<NetworkRepository>, RepositoryError>
Create a new network service with a specific configuration path
Trait Implementations§
Source§impl<T: Clone + NetworkRepositoryTrait> Clone for NetworkService<T>
impl<T: Clone + NetworkRepositoryTrait> Clone for NetworkService<T>
Source§fn clone(&self) -> NetworkService<T>
fn clone(&self) -> NetworkService<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for NetworkService<T>where
T: Freeze,
impl<T> RefUnwindSafe for NetworkService<T>where
T: RefUnwindSafe,
impl<T> Send for NetworkService<T>where
T: Send,
impl<T> Sync for NetworkService<T>where
T: Sync,
impl<T> Unpin for NetworkService<T>where
T: Unpin,
impl<T> UnwindSafe for NetworkService<T>where
T: UnwindSafe,
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> Chain<T> for T
impl<T> Chain<T> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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