pub struct ChunkKeyEncoding(/* private fields */);Expand description
A chunk key encoding.
Implementations§
Source§impl ChunkKeyEncoding
impl ChunkKeyEncoding
Sourcepub fn new<T>(chunk_key_encoding: T) -> ChunkKeyEncodingwhere
T: ChunkKeyEncodingTraits + 'static,
pub fn new<T>(chunk_key_encoding: T) -> ChunkKeyEncodingwhere
T: ChunkKeyEncodingTraits + 'static,
Create a chunk key encoding.
Sourcepub fn metadata(&self) -> MetadataV3
pub fn metadata(&self) -> MetadataV3
Create the metadata for the chunk key encoding.
§Panics
Panics if the chunk key encoding has no name for V3.
Sourcepub fn from_metadata(
metadata: &MetadataV3,
) -> Result<ChunkKeyEncoding, PluginCreateError>
pub fn from_metadata( metadata: &MetadataV3, ) -> Result<ChunkKeyEncoding, PluginCreateError>
Create a chunk key encoding from metadata.
§Errors
Returns PluginCreateError if the metadata is invalid or not associated with a registered chunk key encoding plugin.
Trait Implementations§
Source§impl Clone for ChunkKeyEncoding
impl Clone for ChunkKeyEncoding
Source§fn clone(&self) -> ChunkKeyEncoding
fn clone(&self) -> ChunkKeyEncoding
Returns a duplicate 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 moreSource§impl Debug for ChunkKeyEncoding
impl Debug for ChunkKeyEncoding
Source§impl Deref for ChunkKeyEncoding
impl Deref for ChunkKeyEncoding
Source§impl ExtensionName for ChunkKeyEncoding
impl ExtensionName for ChunkKeyEncoding
Source§impl<T> From<Arc<T>> for ChunkKeyEncodingwhere
T: ChunkKeyEncodingTraits + 'static,
impl<T> From<Arc<T>> for ChunkKeyEncodingwhere
T: ChunkKeyEncodingTraits + 'static,
Source§fn from(chunk_key_encoding: Arc<T>) -> ChunkKeyEncoding
fn from(chunk_key_encoding: Arc<T>) -> ChunkKeyEncoding
Converts to this type from the input type.
Source§impl From<Arc<dyn ChunkKeyEncodingTraits>> for ChunkKeyEncoding
impl From<Arc<dyn ChunkKeyEncodingTraits>> for ChunkKeyEncoding
Source§fn from(value: Arc<dyn ChunkKeyEncodingTraits>) -> ChunkKeyEncoding
fn from(value: Arc<dyn ChunkKeyEncodingTraits>) -> ChunkKeyEncoding
Converts to this type from the input type.
Source§impl<T> From<T> for ChunkKeyEncodingwhere
T: ChunkKeyEncodingTraits + 'static,
impl<T> From<T> for ChunkKeyEncodingwhere
T: ChunkKeyEncodingTraits + 'static,
Source§fn from(chunk_key_encoding: T) -> ChunkKeyEncoding
fn from(chunk_key_encoding: T) -> ChunkKeyEncoding
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ChunkKeyEncoding
impl Send for ChunkKeyEncoding
impl Sync for ChunkKeyEncoding
impl !RefUnwindSafe for ChunkKeyEncoding
impl Unpin for ChunkKeyEncoding
impl UnsafeUnpin for ChunkKeyEncoding
impl !UnwindSafe for ChunkKeyEncoding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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