pub trait OptContents: MaybeContents + PropertiesBackend {
// Required methods
fn is_skipped_content(
&self,
node: NodeId,
) -> PropertiesResult<'_, Option<bool>, Self>;
fn content_length(
&self,
node: NodeId,
) -> PropertiesResult<'_, Option<u64>, Self>;
}
Expand description
Trait implemented by all implementors of MaybeContents
but NoContents
Required Methods§
Sourcefn is_skipped_content(
&self,
node: NodeId,
) -> PropertiesResult<'_, Option<bool>, Self>
fn is_skipped_content( &self, node: NodeId, ) -> PropertiesResult<'_, Option<bool>, Self>
Returns whether the given node is a skipped content, or None
if out of bounds
Sourcefn content_length(
&self,
node: NodeId,
) -> PropertiesResult<'_, Option<u64>, Self>
fn content_length( &self, node: NodeId, ) -> PropertiesResult<'_, Option<u64>, Self>
Returns the content’s length, or None
if out of bounds, or u64::MAX
if it
is not a content / does not not have a known length
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.