pub struct StorageLevel {
pub use_disk: bool,
pub use_memory: bool,
pub use_off_heap: bool,
pub deserialized: bool,
pub replication: i32,
}Expand description
Re-exported so persist(...) / storage_level() have a public storage-level type.
StorageLevel for persisting Datasets/Tables.
Fields§
§use_disk: bool(Required) Whether the cache should use disk or not.
use_memory: bool(Required) Whether the cache should use memory or not.
use_off_heap: bool(Required) Whether the cache should use off-heap or not.
deserialized: bool(Required) Whether the cached data is deserialized or not.
replication: i32(Required) The number of replicas.
Trait Implementations§
Source§impl Clone for StorageLevel
impl Clone for StorageLevel
Source§fn clone(&self) -> StorageLevel
fn clone(&self) -> StorageLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StorageLevel
Source§impl Debug for StorageLevel
impl Debug for StorageLevel
Source§impl Default for StorageLevel
impl Default for StorageLevel
Source§fn default() -> StorageLevel
fn default() -> StorageLevel
Returns the “default value” for a type. Read more
impl Eq for StorageLevel
Source§impl Hash for StorageLevel
impl Hash for StorageLevel
Source§impl Message for StorageLevel
impl Message for StorageLevel
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for StorageLevel
impl PartialEq for StorageLevel
Source§impl StorageLevelExt for StorageLevel
impl StorageLevelExt for StorageLevel
Source§fn none() -> StorageLevel
fn none() -> StorageLevel
No storage (
NONE). Not a valid level to persist(...) with.Source§fn disk_only() -> StorageLevel
fn disk_only() -> StorageLevel
Disk only, 1 replica (
DISK_ONLY).Source§fn disk_only_2() -> StorageLevel
fn disk_only_2() -> StorageLevel
Disk only, 2 replicas (
DISK_ONLY_2).Source§fn disk_only_3() -> StorageLevel
fn disk_only_3() -> StorageLevel
Disk only, 3 replicas (
DISK_ONLY_3).Source§fn memory_only() -> StorageLevel
fn memory_only() -> StorageLevel
Memory only, 1 replica (
MEMORY_ONLY).Source§fn memory_only_2() -> StorageLevel
fn memory_only_2() -> StorageLevel
Memory only, 2 replicas (
MEMORY_ONLY_2).Source§fn memory_and_disk() -> StorageLevel
fn memory_and_disk() -> StorageLevel
Memory and disk, 1 replica (
MEMORY_AND_DISK).Source§fn memory_and_disk_2() -> StorageLevel
fn memory_and_disk_2() -> StorageLevel
Memory and disk, 2 replicas (
MEMORY_AND_DISK_2).Source§fn memory_and_disk_deser() -> StorageLevel
fn memory_and_disk_deser() -> StorageLevel
Memory and disk, deserialized, 1 replica (
MEMORY_AND_DISK_DESER) — the
default level used by cache().Source§fn off_heap() -> StorageLevel
fn off_heap() -> StorageLevel
Off-heap (
OFF_HEAP).impl StructuralPartialEq for StorageLevel
Auto Trait Implementations§
impl Freeze for StorageLevel
impl RefUnwindSafe for StorageLevel
impl Send for StorageLevel
impl Sync for StorageLevel
impl Unpin for StorageLevel
impl UnsafeUnpin for StorageLevel
impl UnwindSafe for StorageLevel
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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