pub enum StreamMemory {
NoMemory,
Static(StreamBuffer),
Dynamic {
buffer: StreamBuffer,
has_spawn: bool,
has_close: bool,
},
Instances {
buffer: StreamBuffer,
parameter: Vec<Parameter>,
},
}Expand description
The kind of a stream’s memory
Variants§
NoMemory
No memory is needed for this stream
Static(StreamBuffer)
Memory is needed, but only for a single instance living for the whole runtime
Dynamic
Memory is needed for a single instance that dynamically spawns and closes
Fields
§
buffer: StreamBufferThe buffer of the memory
Instances
Memory is required for a stream spawning multiple instances
Fields
§
buffer: StreamBufferThe buffer of each stream’s instance
Implementations§
Source§impl StreamMemory
impl StreamMemory
Sourcepub fn parameters(&self) -> Option<&[Parameter]>
pub fn parameters(&self) -> Option<&[Parameter]>
Returns the parameters of a stream if it is parameterized (or None otherwise)
Sourcepub fn num_parameters(&self) -> usize
pub fn num_parameters(&self) -> usize
Returns the number of parameters of a parameterized streams or 0 for unparameterized streams
Source§impl StreamMemory
impl StreamMemory
Sourcepub fn buffer(&self) -> Option<&StreamBuffer>
pub fn buffer(&self) -> Option<&StreamBuffer>
Returns the [Streambuffer] of the memory. Returns None if no memory is required
Trait Implementations§
Source§impl Add for StreamMemory
impl Add for StreamMemory
Source§impl Clone for StreamMemory
impl Clone for StreamMemory
Source§fn clone(&self) -> StreamMemory
fn clone(&self) -> StreamMemory
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 StreamMemory
impl Debug for StreamMemory
Source§impl Hash for StreamMemory
impl Hash for StreamMemory
Source§impl PartialEq for StreamMemory
impl PartialEq for StreamMemory
impl Eq for StreamMemory
impl StructuralPartialEq for StreamMemory
Auto Trait Implementations§
impl Freeze for StreamMemory
impl RefUnwindSafe for StreamMemory
impl Send for StreamMemory
impl Sync for StreamMemory
impl Unpin for StreamMemory
impl UnwindSafe for StreamMemory
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<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> 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