pub struct SnapshotBuilder { /* private fields */ }Expand description
Builder for creating snapshots.
Implementations§
Source§impl SnapshotBuilder
impl SnapshotBuilder
Sourcepub fn version(self, version: impl Into<String>) -> Self
pub fn version(self, version: impl Into<String>) -> Self
Set the global version for this snapshot.
Sourcepub fn resources(
self,
type_url: TypeUrl,
resources: impl IntoIterator<Item = BoxResource>,
) -> Self
pub fn resources( self, type_url: TypeUrl, resources: impl IntoIterator<Item = BoxResource>, ) -> Self
Add resources of a specific type.
The version for this resource type defaults to the global version.
Sourcepub fn resources_with_version(
self,
type_url: TypeUrl,
version: impl Into<String>,
resources: impl IntoIterator<Item = BoxResource>,
) -> Self
pub fn resources_with_version( self, type_url: TypeUrl, version: impl Into<String>, resources: impl IntoIterator<Item = BoxResource>, ) -> Self
Add resources of a specific type with a custom version.
Sourcepub fn resource(self, type_url: TypeUrl, resource: BoxResource) -> Self
pub fn resource(self, type_url: TypeUrl, resource: BoxResource) -> Self
Add a single resource.
Trait Implementations§
Source§impl Debug for SnapshotBuilder
impl Debug for SnapshotBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for SnapshotBuilder
impl !UnwindSafe for SnapshotBuilder
impl Freeze for SnapshotBuilder
impl Send for SnapshotBuilder
impl Sync for SnapshotBuilder
impl Unpin for SnapshotBuilder
impl UnsafeUnpin for SnapshotBuilder
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request